no folder fixes for groupings display

This commit is contained in:
Kyle Spearrin 2018-12-10 09:41:21 -05:00
parent fdea212415
commit dff91dc67d

View file

@ -328,7 +328,8 @@ namespace Bit.App.Pages
if(_folder || !string.IsNullOrWhiteSpace(_folderId))
{
ciphers = await _cipherService.GetAllByFolderAsync(_folderId);
if(!string.IsNullOrWhiteSpace(_folderId))
{
var folders = await _folderService.GetAllAsync();
var fGroupings = folders.Select(f => new Grouping(f, null)).OrderBy(g => g.Name).ToList();
var fTreeNodes = Helpers.GetAllNested(fGroupings);
@ -338,6 +339,7 @@ namespace Bit.App.Pages
Groupings = fTreeNode.Children.Select(n => new GroupingOrCipher(n)).ToArray();
}
}
}
else if(!string.IsNullOrWhiteSpace(_collectionId))
{
ciphers = await _cipherService.GetAllByCollectionAsync(_collectionId);