From 515aee896e02438906fa1b3ce46a8e73bff01fc7 Mon Sep 17 00:00:00 2001 From: TheXamlGuy Date: Wed, 3 Jul 2024 12:39:23 +0100 Subject: [PATCH] Fixed imagereader, again --- Wallet/ItemHeaderViewModel.cs | 11 +++++++++++ Wallet/ItemNavigationViewModel.cs | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Wallet/ItemHeaderViewModel.cs b/Wallet/ItemHeaderViewModel.cs index a1532d2..5a06fb4 100644 --- a/Wallet/ItemHeaderViewModel.cs +++ b/Wallet/ItemHeaderViewModel.cs @@ -10,6 +10,7 @@ public partial class ItemHeaderViewModel : INotificationHandler>, INotificationHandler>, INotificationHandler>>, + INotificationHandler>>, IItemViewModel { private readonly ItemHeaderConfiguration configuration; @@ -95,4 +96,14 @@ public partial class ItemHeaderViewModel : configuration.ImageDescriptor = value; } } + + public Task Handle(NotifyEventArgs> args) + { + if (args.Sender is Item item) + { + ImageDescriptor = item.Value; + } + + return Task.CompletedTask; + } } \ No newline at end of file diff --git a/Wallet/ItemNavigationViewModel.cs b/Wallet/ItemNavigationViewModel.cs index 2cfe5d3..c2dc9fa 100644 --- a/Wallet/ItemNavigationViewModel.cs +++ b/Wallet/ItemNavigationViewModel.cs @@ -1,6 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using System.Diagnostics; using Toolkit.Foundation; namespace Wallet;