mirror of
https://github.com/bitwarden/mobile
synced 2025-12-24 04:04:34 +00:00
Don't build the keyboard index for autofill if using logout action (#943)
* Don't build the keyboard index for autofill if using logout action * trigger index rebuild on vault timeout changed event
This commit is contained in:
@@ -15,6 +15,11 @@ namespace Bit.iOS.Core.Utilities
|
||||
if (await AutofillEnabled())
|
||||
{
|
||||
var storageService = ServiceContainer.Resolve<IStorageService>("storageService");
|
||||
var timeoutAction = await storageService.GetAsync<string>(Bit.Core.Constants.VaultTimeoutActionKey);
|
||||
if (timeoutAction == "logOut")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var vaultTimeoutService = ServiceContainer.Resolve<IVaultTimeoutService>("vaultTimeoutService");
|
||||
if (await vaultTimeoutService.IsLockedAsync())
|
||||
{
|
||||
@@ -42,6 +47,12 @@ namespace Bit.iOS.Core.Utilities
|
||||
|
||||
public static async Task<bool> IdentitiesCanIncremental()
|
||||
{
|
||||
var storageService = ServiceContainer.Resolve<IStorageService>("storageService");
|
||||
var timeoutAction = await storageService.GetAsync<string>(Bit.Core.Constants.VaultTimeoutActionKey);
|
||||
if (timeoutAction == "logOut")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var state = await ASCredentialIdentityStore.SharedStore?.GetCredentialIdentityStoreStateAsync();
|
||||
return state != null && state.Enabled && state.SupportsIncrementalUpdates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user