mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 07:05:35 +03:00
PM-10528: Fix user switching issue due to rapid Activity recreation when locking (#3669)
This commit is contained in:
parent
32b260ca9f
commit
aae7a6e895
1 changed files with 4 additions and 0 deletions
|
@ -112,6 +112,10 @@ class MainViewModel @Inject constructor(
|
||||||
.onEach {
|
.onEach {
|
||||||
when (it) {
|
when (it) {
|
||||||
is VaultStateEvent.Locked -> {
|
is VaultStateEvent.Locked -> {
|
||||||
|
// Similar to account switching, triggering this action too soon can
|
||||||
|
// interfere with animations or navigation logic, so we will delay slightly.
|
||||||
|
@Suppress("MagicNumber")
|
||||||
|
delay(500)
|
||||||
trySendAction(MainAction.Internal.VaultUnlockStateChange)
|
trySendAction(MainAction.Internal.VaultUnlockStateChange)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue