Added some tests

Removed false first group, replaced it a button in the header
Code refactor
This commit is contained in:
BONNEVILLE Geoffroy
2017-12-18 18:53:42 +01:00
parent 88e5b80778
commit 7ff6bccbc4
14 changed files with 127 additions and 71 deletions

View File

@@ -61,7 +61,7 @@ namespace ModernKeePass.ViewModels
{
get
{
if (_pwGroup == null) return Symbol.Add;
//if (_pwGroup == null) return Symbol.Add;
var result = PwIconToSegoeMapping.GetSymbolFromIcon(_pwGroup.IconId);
return result == Symbol.More ? Symbol.Folder : result;
}
@@ -115,7 +115,6 @@ namespace ModernKeePass.ViewModels
Entries = new ObservableCollection<EntryVm>(pwGroup.Entries.Select(e => new EntryVm(e, this)));
Entries.CollectionChanged += Entries_CollectionChanged;
Groups = new ObservableCollection<GroupVm>(pwGroup.Groups.Select(g => new GroupVm(g, this, recycleBinId)));
Groups.Insert(0, new GroupVm());
}
private void Entries_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)