mirror of
https://github.com/bitwarden/mobile.git
synced 2025-02-18 01:31:42 +01:00
separate init and showVaultFilter property set (#1954)
This commit is contained in:
parent
3aef86bd34
commit
f24388c1b5
@ -87,7 +87,7 @@ namespace Bit.App.Pages
|
|||||||
|
|
||||||
public async Task InitAsync()
|
public async Task InitAsync()
|
||||||
{
|
{
|
||||||
await InitVaultFilterAsync();
|
await InitVaultFilterAsync(true);
|
||||||
WebsiteIconsEnabled = !(await _stateService.GetDisableFaviconAsync()).GetValueOrDefault();
|
WebsiteIconsEnabled = !(await _stateService.GetDisableFaviconAsync()).GetValueOrDefault();
|
||||||
PerformSearchIfPopulated();
|
PerformSearchIfPopulated();
|
||||||
}
|
}
|
||||||
|
@ -181,9 +181,9 @@ namespace Bit.App.Pages
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await InitVaultFilterAsync(MainPage);
|
||||||
if (MainPage)
|
if (MainPage)
|
||||||
{
|
{
|
||||||
await InitVaultFilterAsync();
|
|
||||||
PageTitle = ShowVaultFilter ? AppResources.Vaults : AppResources.MyVault;
|
PageTitle = ShowVaultFilter ? AppResources.Vaults : AppResources.MyVault;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ namespace Bit.App.Pages
|
|||||||
protected bool IsVaultFilterOrgVault => _vaultFilterSelection != AppResources.AllVaults &&
|
protected bool IsVaultFilterOrgVault => _vaultFilterSelection != AppResources.AllVaults &&
|
||||||
_vaultFilterSelection != AppResources.MyVault;
|
_vaultFilterSelection != AppResources.MyVault;
|
||||||
|
|
||||||
protected async Task InitVaultFilterAsync()
|
protected async Task InitVaultFilterAsync(bool shouldUpdateShowVaultFilter)
|
||||||
{
|
{
|
||||||
_organizations = await organizationService.GetAllAsync();
|
_organizations = await organizationService.GetAllAsync();
|
||||||
if (_organizations?.Any() ?? false)
|
if (_organizations?.Any() ?? false)
|
||||||
@ -77,9 +77,12 @@ namespace Bit.App.Pages
|
|||||||
VaultFilterDescription = AppResources.AllVaults;
|
VaultFilterDescription = AppResources.AllVaults;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (shouldUpdateShowVaultFilter)
|
||||||
|
{
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
ShowVaultFilter = await policyService.ShouldShowVaultFilterAsync();
|
ShowVaultFilter = await policyService.ShouldShowVaultFilterAsync();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected async Task<List<CipherView>> GetAllCiphersAsync()
|
protected async Task<List<CipherView>> GetAllCiphersAsync()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user