Wire in time remaining for registration lock responses.
This commit is contained in:
parent
c36fba2ab7
commit
279e55d65f
2 changed files with 11 additions and 1 deletions
|
@ -430,6 +430,7 @@ class ChangeNumberViewModel : ViewModel() {
|
|||
is VerificationCodeRequestResult.RegistrationLocked ->
|
||||
store.update {
|
||||
it.copy(
|
||||
lockedTimeRemaining = result.timeRemaining,
|
||||
svr2Credentials = result.svr2Credentials,
|
||||
svr3Credentials = result.svr3Credentials
|
||||
)
|
||||
|
|
|
@ -513,7 +513,12 @@ class RegistrationViewModel : ViewModel() {
|
|||
|
||||
is TokenNotAccepted -> Log.i(TAG, "Received TokenNotAccepted.", sessionResult.getCause())
|
||||
|
||||
is RegistrationLocked -> Log.i(TAG, "Received RegistrationLocked.", sessionResult.getCause())
|
||||
is RegistrationLocked -> {
|
||||
store.update {
|
||||
it.copy(lockedTimeRemaining = sessionResult.timeRemaining)
|
||||
}
|
||||
Log.i(TAG, "Received RegistrationLocked.", sessionResult.getCause())
|
||||
}
|
||||
|
||||
is NoSuchSession -> Log.i(TAG, "Received NoSuchSession.", sessionResult.getCause())
|
||||
|
||||
|
@ -763,6 +768,10 @@ class RegistrationViewModel : ViewModel() {
|
|||
|
||||
if (result is RegisterAccountResult.RegistrationLocked) {
|
||||
Log.d(TAG, "Registration lock response received.")
|
||||
val timeRemaining = result.timeRemaining
|
||||
store.update {
|
||||
it.copy(lockedTimeRemaining = timeRemaining)
|
||||
}
|
||||
reglock = true
|
||||
if (pin == null && SignalStore.svr.registrationLockToken != null) {
|
||||
Log.d(TAG, "Retrying registration with stored credentials.")
|
||||
|
|
Loading…
Add table
Reference in a new issue