Increase prominence of network errors during re-registration.

This commit is contained in:
Nicholas Tinsley
2023-09-26 10:43:57 -04:00
parent f380ac5e43
commit b81ff4d672

View File

@@ -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()
}
}