mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
ShowNoData for main page
This commit is contained in:
parent
c8d8d94c7f
commit
7d8dfb997e
1 changed files with 10 additions and 16 deletions
|
@ -59,9 +59,6 @@ namespace Bit.App.Pages
|
|||
CipherOptionsCommand = new Command<CipherView>(CipherOptionsAsync);
|
||||
}
|
||||
|
||||
public bool ShowFavorites { get; set; } = true;
|
||||
public bool ShowFolders { get; set; } = true;
|
||||
public bool ShowCollections { get; set; } = true;
|
||||
public bool MainPage { get; set; }
|
||||
public CipherType? Type { get; set; }
|
||||
public string FolderId { get; set; }
|
||||
|
@ -70,6 +67,7 @@ namespace Bit.App.Pages
|
|||
|
||||
public bool HasCiphers { get; set; }
|
||||
public bool HasFolders { get; set; }
|
||||
public bool HasCollections { get; set; }
|
||||
public List<CipherView> Ciphers { get; set; }
|
||||
public List<CipherView> FavoriteCiphers { get; set; }
|
||||
public List<CipherView> NoFolderCiphers { get; set; }
|
||||
|
@ -216,11 +214,11 @@ namespace Bit.App.Pages
|
|||
finally
|
||||
{
|
||||
_doingLoad = false;
|
||||
ShowNoData = !groupedItems.Any();
|
||||
ShowList = !ShowNoData;
|
||||
Loaded = true;
|
||||
Loading = false;
|
||||
Refreshing = false;
|
||||
ShowNoData = (MainPage && !HasCiphers) || !groupedItems.Any();
|
||||
ShowList = !ShowNoData;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,21 +299,17 @@ namespace Bit.App.Pages
|
|||
_collectionCounts.Clear();
|
||||
_typeCounts.Clear();
|
||||
HasFolders = false;
|
||||
HasCollections = false;
|
||||
Filter = null;
|
||||
|
||||
if(MainPage)
|
||||
{
|
||||
if(ShowFolders)
|
||||
{
|
||||
Folders = await _folderService.GetAllDecryptedAsync();
|
||||
NestedFolders = await _folderService.GetAllNestedAsync();
|
||||
HasFolders = Folders.Any();
|
||||
}
|
||||
if(ShowCollections)
|
||||
{
|
||||
HasFolders = NestedFolders.Any();
|
||||
Collections = await _collectionService.GetAllDecryptedAsync();
|
||||
NestedCollections = await _collectionService.GetAllNestedAsync(Collections);
|
||||
}
|
||||
HasCollections = NestedCollections.Any();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue