Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
setupInitialState();
setupSmsRetriever();
setupListeners();
startResendTimer();

activity.setTitle(R.string.connect_verify_phone_title);
return binding.getRoot();
Expand Down Expand Up @@ -176,29 +175,30 @@ private void displayOtpError(String message) {
@Override
public void onStart() {
super.onStart();
registerSmsBroadcastReceiver();
}

@Override
public void onResume() {
super.onResume();
startResendTimer();
registerSmsBroadcastReceiver();
KeyboardHelper.showKeyboardOnInput(activity, binding.customOtpView);
}

@Override
public void onPause() {
super.onPause();
stopResendTimer();
try {
activity.unregisterReceiver(smsBroadcastReceiver);
} catch (IllegalArgumentException e) {
e.printStackTrace();

}
}

@Override
public void onStop() {
super.onStop();
stopResendTimer();
}

@Override
Expand Down Expand Up @@ -249,9 +249,9 @@ private void updateVerificationMessage() {
}

private void requestOtp() {
otpRequestTime = new DateTime();
clearOtpError();
if (primaryPhone != null && !primaryPhone.isEmpty()){
otpRequestTime = new DateTime();
otpManager.requestOtp(primaryPhone);
}
}
Expand Down