mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Restore Main and Settings Page
Entry and Group delete events converted to commands Code cleanup
This commit is contained in:
@@ -154,10 +154,19 @@ namespace ModernKeePass.ViewModels
|
||||
_resource.GetResourceValue("EntityDeleteCancelButton"),
|
||||
async isOk =>
|
||||
{
|
||||
var text = IsRecycleOnDelete ? _resource.GetResourceValue("GroupRecycled") : _resource.GetResourceValue("GroupDeleted");
|
||||
//ToastNotificationHelper.ShowMovedToast(Entity, resource.GetResourceValue("EntityDeleting"), text);
|
||||
await MarkForDelete(_resource.GetResourceValue("RecycleBinTitle"));
|
||||
_navigation.GoBack();
|
||||
if (isOk)
|
||||
{
|
||||
var text = IsRecycleOnDelete
|
||||
? _resource.GetResourceValue("GroupRecycled")
|
||||
: _resource.GetResourceValue("GroupDeleted");
|
||||
//ToastNotificationHelper.ShowMovedToast(Entity, resource.GetResourceValue("EntityDeleting"), text);
|
||||
await _mediator.Send(new DeleteGroupCommand
|
||||
{
|
||||
GroupId = _group.Id, ParentGroupId = _group.ParentGroupId,
|
||||
RecycleBinName = _resource.GetResourceValue("RecycleBinTitle")
|
||||
});
|
||||
_navigation.GoBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -181,11 +190,6 @@ namespace ModernKeePass.ViewModels
|
||||
IsNew = true
|
||||
});
|
||||
}
|
||||
|
||||
public async Task MarkForDelete(string recycleBinTitle)
|
||||
{
|
||||
await _mediator.Send(new DeleteGroupCommand { GroupId = _group.Id, ParentGroupId = _group.ParentGroupId, RecycleBinName = recycleBinTitle });
|
||||
}
|
||||
|
||||
public async Task Move(GroupVm destination)
|
||||
{
|
||||
|
Reference in New Issue
Block a user