mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
separate init and showVaultFilter property set (#1954)
This commit is contained in:
parent
3aef86bd34
commit
f24388c1b5
3 changed files with 8 additions and 5 deletions
|
@ -87,7 +87,7 @@ namespace Bit.App.Pages
|
|||
|
||||
public async Task InitAsync()
|
||||
{
|
||||
await InitVaultFilterAsync();
|
||||
await InitVaultFilterAsync(true);
|
||||
WebsiteIconsEnabled = !(await _stateService.GetDisableFaviconAsync()).GetValueOrDefault();
|
||||
PerformSearchIfPopulated();
|
||||
}
|
||||
|
|
|
@ -181,9 +181,9 @@ namespace Bit.App.Pages
|
|||
return;
|
||||
}
|
||||
|
||||
await InitVaultFilterAsync(MainPage);
|
||||
if (MainPage)
|
||||
{
|
||||
await InitVaultFilterAsync();
|
||||
PageTitle = ShowVaultFilter ? AppResources.Vaults : AppResources.MyVault;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace Bit.App.Pages
|
|||
protected bool IsVaultFilterOrgVault => _vaultFilterSelection != AppResources.AllVaults &&
|
||||
_vaultFilterSelection != AppResources.MyVault;
|
||||
|
||||
protected async Task InitVaultFilterAsync()
|
||||
protected async Task InitVaultFilterAsync(bool shouldUpdateShowVaultFilter)
|
||||
{
|
||||
_organizations = await organizationService.GetAllAsync();
|
||||
if (_organizations?.Any() ?? false)
|
||||
|
@ -77,8 +77,11 @@ namespace Bit.App.Pages
|
|||
VaultFilterDescription = AppResources.AllVaults;
|
||||
}
|
||||
}
|
||||
await Task.Delay(100);
|
||||
ShowVaultFilter = await policyService.ShouldShowVaultFilterAsync();
|
||||
if (shouldUpdateShowVaultFilter)
|
||||
{
|
||||
await Task.Delay(100);
|
||||
ShowVaultFilter = await policyService.ShouldShowVaultFilterAsync();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task<List<CipherView>> GetAllCiphersAsync()
|
||||
|
|
Loading…
Reference in a new issue