Browse Source

PennyTest Status flag fixes

master
Preyea Regmi 6 years ago
parent
commit
a9985806d3
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 14
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2Presenter.java
  3. 3
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/pennytest/PennyTestPresenter.java
  4. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/GenericApiObserverResponseV2.java

BIN
.idea/caches/build_file_checksums.ser

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

@ -98,9 +98,10 @@ public class HomeV2Presenter extends BasePresenter implements HomeV2PresenterInt
@Override
public String checkIfUserVerified() {
String resultMessage = null;
String pennyTestStatus=gateway.getPennyTestStatus();
if (!gateway.hasUserSubmittedKYC())
resultMessage = "Kindly complete your registration process with us to start using GME services";
else if(!gateway.getPennyTestStatus().equalsIgnoreCase("2"))
else if (pennyTestStatus!=null&&pennyTestStatus.length()>0&& !pennyTestStatus.equalsIgnoreCase("2"))
resultMessage = "Please verify your primary bank account to complete the registration";
else if (!gateway.isUserKYCVerified())
resultMessage = "Your registration request is in approval process. You will soon be able to use GME services";
@ -175,8 +176,13 @@ public class HomeV2Presenter extends BasePresenter implements HomeV2PresenterInt
boolean disableKYCViewClick = userInfoModelV2.getKyc() && !userInfoModelV2.isVerified();
boolean shouldShowKYCView = false;
boolean isPennyTestPending = !userInfoModelV2.getPennyTestStatus().equalsIgnoreCase("2");
boolean hasRequestedPennyTest = userInfoModelV2.getPennyTestStatus().equalsIgnoreCase("1");
boolean isPennyTestPending = false;
boolean hasRequestedPennyTest = false;
if (userInfoModelV2.getPennyTestStatus() != null) {
isPennyTestPending = !userInfoModelV2.getPennyTestStatus().equalsIgnoreCase("2");
hasRequestedPennyTest= userInfoModelV2.getPennyTestStatus().equalsIgnoreCase("1");
}
if (!userInfoModelV2.getKyc()) {
shouldShowKYCView = true;
@ -198,7 +204,7 @@ public class HomeV2Presenter extends BasePresenter implements HomeV2PresenterInt
userInfoModelV2.getRewardPoint(), isPennyTestPending && !shouldShowKYCView, hasRequestedPennyTest,
pennyTestTitle, pennyTestMessage));
view.showWithdrawView(userInfoModelV2.isVerified()&&userInfoModelV2.getPennyTestStatus().equalsIgnoreCase("2"));
view.showWithdrawView(userInfoModelV2.isVerified() && !isPennyTestPending);
AppUpdateModel androidAppUpdateModel = null;
if (userInfoModelV2.getAppUpdate() != null)

3
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/pennytest/PennyTestPresenter.java

@ -134,13 +134,10 @@ public class PennyTestPresenter extends BasePresenter implements PennyTestIntera
});
});
}
else
{
view.showPopUpMessage(t.getMsg(),CustomAlertDialog.AlertType.FAILED,alertType->view.morphProgressBarIntoButton(null));
}
}

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/GenericApiObserverResponseV2.java

@ -12,7 +12,7 @@ import retrofit2.HttpException;
/**
* Created by Preyea R. Regmi
* Use this wrapper class to abstract application wise network response for rx-retrofit 2.0. This type encapsulates the user specified data within GenericRssponseDataModel under "Data" field.
* However this type uses a little bit of "reflection" underneath to avoid "Type Erasure" occured while inferring Type from supplied generics. Reflection will be removed at next phase.
* However this class uses a little bit of "reflection" underneath to avoid "Type Erasure" occured while inferring Type from supplied generics. Reflection will be removed at next phase.
*/
public abstract class GenericApiObserverResponseV2<T> extends DisposableObserver<ResponseBody> {

Loading…
Cancel
Save