Add ability to fully delete items from the DB

This commit is contained in:
TheXamlGuy
2024-06-23 09:58:19 +01:00
parent 95de9d187f
commit db20ee15cc
18 changed files with 98 additions and 22 deletions
+7 -4
View File
@@ -23,6 +23,7 @@ public partial class ItemNavigationViewModel(IServiceProvider provider,
INotificationHandler<UnarchiveEventArgs<Item>>,
INotificationHandler<FavouriteEventArgs<Item>>,
INotificationHandler<UnfavouriteEventArgs<Item>>,
INotificationHandler<DeleteEventArgs<Item>>,
INotificationHandler<NotifyEventArgs<ItemHeader<string>>>,
IKeyed<Guid>,
ISelectable,
@@ -43,15 +44,14 @@ public partial class ItemNavigationViewModel(IServiceProvider provider,
[ObservableProperty]
private Guid id = id;
[ObservableProperty]
private bool isSelected = isSelected;
[ObservableProperty]
private string? name = name;
[ObservableProperty]
private string named = $"{named}";
[ObservableProperty]
private bool isSelected = isSelected;
public IContentTemplate Template { get; set; } = template;
public Task Handle(ArchiveEventArgs<Item> args) =>
@@ -75,4 +75,7 @@ public partial class ItemNavigationViewModel(IServiceProvider provider,
return Task.CompletedTask;
}
public Task Handle(DeleteEventArgs<Item> args) =>
Task.Run(Dispose);
}