mirror of
https://github.com/bitwarden/android.git
synced 2026-06-01 10:16:47 -05:00
BIT-2255: When admin-approval is denied, do not update the UI (#1283)
This commit is contained in:
committed by
Álison Fernandes
parent
f6f2746b25
commit
e69ef60f53
@@ -158,18 +158,28 @@ class LoginWithDeviceViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
CreateAuthRequestResult.Declined -> {
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
viewState = LoginWithDeviceState.ViewState.Content(
|
||||
loginWithDeviceType = it.loginWithDeviceType,
|
||||
fingerprintPhrase = "",
|
||||
isResendNotificationLoading = false,
|
||||
),
|
||||
dialogState = LoginWithDeviceState.DialogState.Error(
|
||||
title = null,
|
||||
message = R.string.this_request_is_no_longer_valid.asText(),
|
||||
),
|
||||
)
|
||||
when (state.loginWithDeviceType) {
|
||||
LoginWithDeviceType.OTHER_DEVICE,
|
||||
LoginWithDeviceType.SSO_OTHER_DEVICE,
|
||||
-> {
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
viewState = LoginWithDeviceState.ViewState.Content(
|
||||
loginWithDeviceType = it.loginWithDeviceType,
|
||||
fingerprintPhrase = "",
|
||||
isResendNotificationLoading = false,
|
||||
),
|
||||
dialogState = LoginWithDeviceState.DialogState.Error(
|
||||
title = null,
|
||||
message = R.string.this_request_is_no_longer_valid.asText(),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
LoginWithDeviceType.SSO_ADMIN_APPROVAL -> {
|
||||
// Do nothing, the user should not be informed of this state
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user