diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/gateway/KYCV2Gateway.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/gateway/KYCV2Gateway.java index 9eb5ae2e..7ba90f88 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/gateway/KYCV2Gateway.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/gateway/KYCV2Gateway.java @@ -1,5 +1,7 @@ package com.gmeremit.online.gmeremittance_native.kycV2.gateway; +import com.gmeremit.online.gmeremittance_native.GmeApplication; +import com.gmeremit.online.gmeremittance_native.base.PrefKeys; import com.gmeremit.online.gmeremittance_native.base.PrivilegedGateway; import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRegistrationDataResponse; import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRelatedDataResponse; @@ -96,6 +98,11 @@ public class KYCV2Gateway extends PrivilegedGateway implements KYCV2InteractorIn } + @Override + public void updateKYCSubmittedFlagLocally(boolean action) { + GmeApplication.getStorage().edit().putBoolean(PrefKeys.USER_KYC_SUBMITTED,action).apply(); + } + private MultipartBody.Part createImageUploadFieldFromPath(String key,String imagePath) { diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2InteractorInterface.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2InteractorInterface.java index 364feaa1..9ac16262 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2InteractorInterface.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2InteractorInterface.java @@ -45,5 +45,7 @@ public interface KYCV2InteractorInterface extends BaseInteractorInterface { File back, File passbook, File passport); + + void updateKYCSubmittedFlagLocally(boolean action); } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java index cbdcb2c2..1217c17f 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java @@ -553,6 +553,7 @@ public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInter protected void onSuccess(KYCRegistrationDataResponse kycRegistrationDataResponse) { if(kycRegistrationDataResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { + gateway.updateKYCSubmittedFlagLocally(true); view.showPopUpMessage(kycRegistrationDataResponse.getMsg(), CustomAlertDialog.AlertType.SUCCESS, new CustomAlertDialog.CustomDialogActionListener() { @Override public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { @@ -562,6 +563,7 @@ public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInter } else { + view.showPopUpMessage(kycRegistrationDataResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); } }