mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Prevent getting stuck on registration lock V2 fragment.
This commit is contained in:
committed by
Cody Henthorne
parent
9af1c72233
commit
c3c713a75a
@@ -93,6 +93,8 @@ class RegistrationV2ViewModel : ViewModel() {
|
||||
|
||||
val incorrectCodeAttempts = store.map { it.incorrectCodeAttempts }.asLiveData()
|
||||
|
||||
val inProgress = store.map { it.inProgress }.asLiveData()
|
||||
|
||||
val svrTriesRemaining: Int
|
||||
get() = store.value.svrTriesRemaining
|
||||
|
||||
@@ -427,7 +429,6 @@ class RegistrationV2ViewModel : ViewModel() {
|
||||
when (sessionResult) {
|
||||
is UnknownError -> {
|
||||
handleGenericError(sessionResult.getCause())
|
||||
return false
|
||||
}
|
||||
|
||||
is Success -> {
|
||||
|
||||
@@ -115,6 +115,14 @@ class RegistrationLockV2Fragment : LoggingFragment(R.layout.fragment_registratio
|
||||
if (triesRemaining < 5) {
|
||||
binding.kbsLockPinInputLabel.text = requireContext().resources.getQuantityString(R.plurals.RegistrationLockFragment__d_attempts_remaining, triesRemaining, triesRemaining)
|
||||
}
|
||||
|
||||
viewModel.inProgress.observe(viewLifecycleOwner) {
|
||||
if (it) {
|
||||
binding.kbsLockPinConfirm.setSpinning()
|
||||
} else {
|
||||
binding.kbsLockPinConfirm.cancelSpinning()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handlePinEntry() {
|
||||
|
||||
Reference in New Issue
Block a user