Browse Source

Reroute for shinan and ibk bank

master
Preyea Regmi 5 years ago
parent
commit
6ba5c114d4
  1. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/base/PrefKeys.java
  2. 10
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/gateway/HomeV2Gateway.java
  3. 12
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/model/UserInfoModelV2.java
  4. 4
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2InteractorInterface.java
  5. 25
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2Presenter.java

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/base/PrefKeys.java

@ -45,6 +45,7 @@ public class PrefKeys {
public static final String USER_DOB = "USER_DOB_V2"; public static final String USER_DOB = "USER_DOB_V2";
public static final String HAS_PROMPTED_USER_FOR_FINGERPRINT_FIRST_TIME = "HAS_PROMPTED_USER_FOR_FINGERPRINT_FIRST_TIME"; public static final String HAS_PROMPTED_USER_FOR_FINGERPRINT_FIRST_TIME = "HAS_PROMPTED_USER_FOR_FINGERPRINT_FIRST_TIME";
public static final String KJ_BANK_NOTICE_SKIP_DAY = "KJ_BANK_NOTICE_SKIP_DAY"; public static final String KJ_BANK_NOTICE_SKIP_DAY = "KJ_BANK_NOTICE_SKIP_DAY";
public static final String HAS_REDIRECTED_TO_AUTODEBIT_SCREEN_ONCE ="HAS_REDIRECTED_TO_AUTODEBIT_SCREEN_ONCE" ;
public static String USER_LAST_INITIATED_PENNY_TEST_MESSAGE="USER_LAST_INITIATED_PENNY_TEST_MESSAGE"; public static String USER_LAST_INITIATED_PENNY_TEST_MESSAGE="USER_LAST_INITIATED_PENNY_TEST_MESSAGE";
public static String USER_PREFERRED_LOCALE ="USER_PREFERRED_LOCALE"; public static String USER_PREFERRED_LOCALE ="USER_PREFERRED_LOCALE";
public static String USER_PREFERRED_LANGUAGE ="USER_PREFERRED_LANGUAGE"; public static String USER_PREFERRED_LANGUAGE ="USER_PREFERRED_LANGUAGE";

10
app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/gateway/HomeV2Gateway.java

@ -129,6 +129,16 @@ public class HomeV2Gateway extends PrivilegedGateway implements HomeV2Interactor
GmeApplication.getStorage().edit().putString(PrefKeys.KJ_BANK_NOTICE_SKIP_DAY, date).apply(); GmeApplication.getStorage().edit().putString(PrefKeys.KJ_BANK_NOTICE_SKIP_DAY, date).apply();
} }
@Override
public void updateHasRedirectedToAutoDebitScreenOnce(boolean action) {
GmeApplication.getStorage().edit().putBoolean(PrefKeys.HAS_REDIRECTED_TO_AUTODEBIT_SCREEN_ONCE, action).apply();
}
@Override
public boolean hasRedirectedToAutoDebitScreenOnce() {
return GmeApplication.getStorage().getBoolean(PrefKeys.HAS_REDIRECTED_TO_AUTODEBIT_SCREEN_ONCE,false);
}
@Override @Override
public boolean hasUserSubmittedKYC() { public boolean hasUserSubmittedKYC() {

12
app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/model/UserInfoModelV2.java

@ -106,7 +106,9 @@ public class UserInfoModelV2 {
protected String yearlyLimit; protected String yearlyLimit;
@SerializedName("dob") @SerializedName("dob")
@Expose @Expose
protected String userDob;
protected String userDob; @SerializedName("redirectTo")
@Expose
protected String redirectTo;
@SerializedName("Data") @SerializedName("Data")
@Expose @Expose
protected Object data; protected Object data;
@ -394,6 +396,14 @@ public class UserInfoModelV2 {
this.pennyTestStatus = pennyTestStatus; this.pennyTestStatus = pennyTestStatus;
} }
public String getRedirectTo() {
return redirectTo;
}
public void setRedirectTo(String redirectTo) {
this.redirectTo = redirectTo;
}
public List<AppUpdateModel> getAppUpdate() { public List<AppUpdateModel> getAppUpdate() {
return appUpdate; return appUpdate;
} }

4
app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2InteractorInterface.java

@ -29,5 +29,9 @@ public interface HomeV2InteractorInterface extends BaseInteractorInterface {
String getKJNoticeSkippedDay(); String getKJNoticeSkippedDay();
void updateKJBankNoticeSkipDay(String date); void updateKJBankNoticeSkipDay(String date);
void updateHasRedirectedToAutoDebitScreenOnce(boolean action);
boolean hasRedirectedToAutoDebitScreenOnce();
} }
} }

25
app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2Presenter.java

@ -271,8 +271,21 @@ public class HomeV2Presenter extends BasePresenter implements HomeV2PresenterInt
if (model.getOS().equalsIgnoreCase("ANDROID")) if (model.getOS().equalsIgnoreCase("ANDROID"))
androidAppUpdateModel = model; androidAppUpdateModel = model;
} }
if (!shouldRouteToAutoDebitScreen(true))
//TODO
if (userInfoModelV2.getRedirectTo().equalsIgnoreCase("autodebit"))
{
if(!gateway.hasRedirectedToAutoDebitScreenOnce()) {
view.showAutoDebitListingScreen();
gateway.updateHasRedirectedToAutoDebitScreenOnce(true);
}
//TODO show in popup view;
}
else {
checkIfUpdateIsRequired(androidAppUpdateModel); checkIfUpdateIsRequired(androidAppUpdateModel);
}
} }
@ -312,15 +325,7 @@ public class HomeV2Presenter extends BasePresenter implements HomeV2PresenterInt
} }
/**
*
* @param apiRequestedToRouteToAutoDebitScreen api flag value that determines if it should be routed to auto debit listing screen
* @return true if handled otherwise false
*/
private boolean shouldRouteToAutoDebitScreen(boolean apiRequestedToRouteToAutoDebitScreen) {
// view.showAutoDebitListingScreen();
return false;
}
@Override @Override
public void skipKJBankNoticeForToday() { public void skipKJBankNoticeForToday() {

Loading…
Cancel
Save