🍒[PM-21385] Defer feature flag check for Bitwarden account sync (#5246)

This commit is contained in:
Patrick Honkonen
2025-05-22 13:39:52 -04:00
committed by GitHub
parent 6f476061f1
commit 4e8e557040
4 changed files with 79 additions and 60 deletions

View File

@@ -156,6 +156,13 @@ internal class AuthenticatorBridgeManagerImpl(
if (!isBound) {
mutableSharedAccountsStateFlow.value = AccountSyncState.Error
} else if (mutableSharedAccountsStateFlow.value == AccountSyncState.AppNotInstalled) {
// This scenario occurs when the Authenticator is installed before Bitwarden, because
// `AppNotInstalled` is the initial state. Binding to the service simply means Bitwarden
// is installed, but does not indicate whether syncing is enabled. When/if syncing is
// toggled in Bitwarden, `onServiceConnected` will be invoked and the state
// will be updated.
mutableSharedAccountsStateFlow.value = AccountSyncState.SyncNotEnabled
}
}