From 53ba30089306b892dfbf173eaf047414f2eca7b8 Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Mon, 21 Sep 2020 15:20:09 +0300 Subject: [PATCH] Add default implementation of new presenter methods --- gradle.properties | 2 +- .../ConfigurableRegisterActivityContract.java | 17 ++++++++++++----- .../ConfigurableRegisterFragmentContract.java | 8 ++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index c1446212c..6aa092b2c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.1.2-SNAPSHOT +VERSION_NAME=2.1.2.1-SNAPSHOT VERSION_CODE=1 GROUP=org.smartregister POM_SETTING_DESCRIPTION=OpenSRP Client Core Application diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java index 1463197ad..15c393226 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java @@ -15,18 +15,25 @@ public interface ConfigurableRegisterActivityContract { interface View { Presenter presenter(); - } interface Presenter { - void saveLanguage(String language); + default void saveLanguage(String language) { + + } + + default void startForm(String formName, String entityId, String metadata, String currentLocationId) { + + } - void startForm(String formName, String entityId, String metadata, String currentLocationId); + default void saveForm(String jsonString, @NonNull RegisterParams registerParams) { - void saveForm(String jsonString, @NonNull RegisterParams registerParams); + } - Interactor createInteractor(); + default Interactor createInteractor() { + return null; + } } interface Model { diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java index cc02b5478..101377c5d 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java @@ -18,13 +18,13 @@ interface View { interface Presenter { - void updateSortAndFilter(List filterList, IField sortField); + default void updateSortAndFilter(List filterList, IField sortField) {} - String getMainCondition(); + default String getMainCondition() { return null; } - String getDefaultSortQuery(); + default String getDefaultSortQuery() { return null; } - String getQueryTable(); + default String getQueryTable() {return null; } } interface Model {