mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Increase prominence of network errors during re-registration.
This commit is contained in:
@@ -139,10 +139,10 @@ class ReRegisterWithPinFragment : LoggingFragment(R.layout.pin_restore_entry_fra
|
||||
onSkipPinEntry()
|
||||
} else if (processor.isServerSentError()) {
|
||||
Log.i(TAG, "Error from server, not likely recoverable", processor.error)
|
||||
Toast.makeText(requireContext(), R.string.RegistrationActivity_error_connecting_to_service, Toast.LENGTH_LONG).show()
|
||||
genericErrorDialog()
|
||||
} else {
|
||||
Log.i(TAG, "Unexpected error occurred", processor.error)
|
||||
Toast.makeText(requireContext(), R.string.RegistrationActivity_error_connecting_to_service, Toast.LENGTH_LONG).show()
|
||||
genericErrorDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,4 +246,11 @@ class ReRegisterWithPinFragment : LoggingFragment(R.layout.pin_restore_entry_fra
|
||||
registrationViewModel.setUserSkippedReRegisterFlow(true)
|
||||
findNavController().safeNavigate(R.id.action_reRegisterWithPinFragment_to_enterPhoneNumberFragment)
|
||||
}
|
||||
|
||||
private fun genericErrorDialog() {
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage(R.string.RegistrationActivity_error_connecting_to_service)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user