mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
Creating groups and entries now navigates to the related detail page, in edit mode
Code cleanup
This commit is contained in:
@@ -76,18 +76,22 @@ namespace ModernKeePass.ViewModels
|
||||
Groups.Insert(0, new GroupVm ());
|
||||
}
|
||||
|
||||
public void CreateNewGroup()
|
||||
public GroupVm CreateNewGroup()
|
||||
{
|
||||
var pwGroup = new PwGroup(true, true, "New group", PwIcon.Folder);
|
||||
var pwGroup = new PwGroup(true, true, string.Empty, PwIcon.Folder);
|
||||
_pwGroup.AddGroup(pwGroup, true);
|
||||
Groups.Add(new GroupVm(pwGroup, this));
|
||||
var newGroup = new GroupVm(pwGroup, this) {IsEditMode = true};
|
||||
Groups.Add(newGroup);
|
||||
return newGroup;
|
||||
}
|
||||
|
||||
public void CreateNewEntry()
|
||||
public EntryVm CreateNewEntry()
|
||||
{
|
||||
var pwEntry = new PwEntry(true, true);
|
||||
_pwGroup.AddEntry(pwEntry, true);
|
||||
Entries.Add(new EntryVm(pwEntry, this));
|
||||
var newEntry = new EntryVm(pwEntry, this) {IsEditMode = true};
|
||||
Entries.Add(newEntry);
|
||||
return newEntry;
|
||||
}
|
||||
|
||||
public void RemoveGroup()
|
||||
|
Reference in New Issue
Block a user