kopia lustrzana https://github.com/ryukoposting/Signal-Android
Ensure that we can still navigate when we get a response from server.
rodzic
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());
|
||||
|
|
Ładowanie…
Reference in New Issue