wip
This commit is contained in:
@@ -9,8 +9,12 @@ public partial class ItemHeaderViewModel : Observable<string, string>,
|
||||
INotificationHandler<UpdateEventArgs<Item>>,
|
||||
INotificationHandler<ConfirmEventArgs<Item>>,
|
||||
INotificationHandler<CancelEventArgs<Item>>,
|
||||
INotificationHandler<NotifyEventArgs<ItemCategory<string>>>,
|
||||
IItemEntryViewModel
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string? category;
|
||||
|
||||
[ObservableProperty]
|
||||
private ItemState state;
|
||||
|
||||
@@ -56,4 +60,14 @@ public partial class ItemHeaderViewModel : Observable<string, string>,
|
||||
State = ItemState.Read;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task Handle(NotifyEventArgs<ItemCategory<string>> args)
|
||||
{
|
||||
if (args.Value is ItemCategory<string> category)
|
||||
{
|
||||
Category = category.Value;
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user