Some refactoring

This commit is contained in:
TheXamlGuy
2024-06-09 22:41:58 +01:00
parent b5f125546f
commit be6924f49e
37 changed files with 204 additions and 107 deletions
+6 -6
View File
@@ -11,18 +11,18 @@ public partial class ItemContentViewModel(IServiceProvider provider,
IContentTemplate template) :
ObservableCollection<ItemSectionViewModel>(provider, factory, mediator, publisher, subscriber, disposer),
IItemEntryViewModel,
INotificationHandler<NotifyEventArgs<ItemCategory<string>>>
INotificationHandler<NotifyEventArgs<ItemCategory<string>>>,
IItemViewModel
{
public IContentTemplate Template { get; set; } = template;
public Task Handle(NotifyEventArgs<ItemCategory<string>> args)
{
if (args.Value is ItemCategory<string> category)
if (args.Sender is ItemCategory<string> category
&& category.Value is string value)
{
if (category.Value is string value)
{
Fetch(() => new SynchronizeExpression(new SynchronizeEventArgs<IItemEntryViewModel, string>(value)), true);
}
Fetch(() => new SynchronizeExpression(new SynchronizeEventArgs<IItemEntryViewModel,
string>(value)), true);
}
return Task.CompletedTask;