mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 06:38:33 +00:00
Ensure that we can still navigate when we get a response from server.
This commit is contained in:
parent
5d87ad0301
commit
17f850b31a
@ -218,6 +218,10 @@ public final class EnterPhoneNumberFragment extends BaseRegistrationFragment {
|
||||
|
||||
@Override
|
||||
public void onNeedCaptcha() {
|
||||
if (getContext() == null) {
|
||||
Log.i(TAG, "Got onNeedCaptcha response, but fragment is no longer attached.");
|
||||
return;
|
||||
}
|
||||
navController.navigate(EnterPhoneNumberFragmentDirections.actionRequestCaptcha());
|
||||
cancelSpinning(register);
|
||||
enableAllEntries();
|
||||
@ -227,6 +231,10 @@ public final class EnterPhoneNumberFragment extends BaseRegistrationFragment {
|
||||
|
||||
@Override
|
||||
public void requestSent(@Nullable String fcmToken) {
|
||||
if (getContext() == null) {
|
||||
Log.i(TAG, "Got requestSent response, but fragment is no longer attached.");
|
||||
return;
|
||||
}
|
||||
model.setFcmToken(fcmToken);
|
||||
model.markASuccessfulAttempt();
|
||||
navController.navigate(EnterPhoneNumberFragmentDirections.actionEnterVerificationCode());
|
||||
|
Loading…
x
Reference in New Issue
Block a user