Some refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user