mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +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);
|
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 bool MainPage { get; set; }
|
||||||
public CipherType? Type { get; set; }
|
public CipherType? Type { get; set; }
|
||||||
public string FolderId { get; set; }
|
public string FolderId { get; set; }
|
||||||
|
@ -70,6 +67,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
public bool HasCiphers { get; set; }
|
public bool HasCiphers { get; set; }
|
||||||
public bool HasFolders { get; set; }
|
public bool HasFolders { get; set; }
|
||||||
|
public bool HasCollections { get; set; }
|
||||||
public List<CipherView> Ciphers { get; set; }
|
public List<CipherView> Ciphers { get; set; }
|
||||||
public List<CipherView> FavoriteCiphers { get; set; }
|
public List<CipherView> FavoriteCiphers { get; set; }
|
||||||
public List<CipherView> NoFolderCiphers { get; set; }
|
public List<CipherView> NoFolderCiphers { get; set; }
|
||||||
|
@ -216,11 +214,11 @@ namespace Bit.App.Pages
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_doingLoad = false;
|
_doingLoad = false;
|
||||||
ShowNoData = !groupedItems.Any();
|
|
||||||
ShowList = !ShowNoData;
|
|
||||||
Loaded = true;
|
Loaded = true;
|
||||||
Loading = false;
|
Loading = false;
|
||||||
Refreshing = false;
|
Refreshing = false;
|
||||||
|
ShowNoData = (MainPage && !HasCiphers) || !groupedItems.Any();
|
||||||
|
ShowList = !ShowNoData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,21 +299,17 @@ namespace Bit.App.Pages
|
||||||
_collectionCounts.Clear();
|
_collectionCounts.Clear();
|
||||||
_typeCounts.Clear();
|
_typeCounts.Clear();
|
||||||
HasFolders = false;
|
HasFolders = false;
|
||||||
|
HasCollections = false;
|
||||||
Filter = null;
|
Filter = null;
|
||||||
|
|
||||||
if(MainPage)
|
if(MainPage)
|
||||||
{
|
|
||||||
if(ShowFolders)
|
|
||||||
{
|
{
|
||||||
Folders = await _folderService.GetAllDecryptedAsync();
|
Folders = await _folderService.GetAllDecryptedAsync();
|
||||||
NestedFolders = await _folderService.GetAllNestedAsync();
|
NestedFolders = await _folderService.GetAllNestedAsync();
|
||||||
HasFolders = Folders.Any();
|
HasFolders = NestedFolders.Any();
|
||||||
}
|
|
||||||
if(ShowCollections)
|
|
||||||
{
|
|
||||||
Collections = await _collectionService.GetAllDecryptedAsync();
|
Collections = await _collectionService.GetAllDecryptedAsync();
|
||||||
NestedCollections = await _collectionService.GetAllNestedAsync(Collections);
|
NestedCollections = await _collectionService.GetAllNestedAsync(Collections);
|
||||||
}
|
HasCollections = NestedCollections.Any();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue