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
+2 -10
View File
@@ -1,5 +1,4 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Toolkit.Foundation;
namespace Wallet;
@@ -35,10 +34,6 @@ public partial class FilterNavigationViewModel :
public Task Handle(ActivatedEventArgs<Wallet> args) =>
Task.FromResult(Activated = true);
[RelayCommand]
public void Invoke() => Publisher.Publish(Notify.As(new Filter(Filter)),
nameof(ItemCollectionViewModel));
}
public partial class FilterNavigationViewModel<TWalletNavigation> :
@@ -46,7 +41,8 @@ public partial class FilterNavigationViewModel<TWalletNavigation> :
IWalletNavigationViewModel,
INotificationHandler<ActivatedEventArgs<Wallet>>,
INotificationHandler<DeactivatedEventArgs<Wallet>>
where TWalletNavigation : IWalletNavigationViewModel
where TWalletNavigation :
IWalletNavigationViewModel
{
[ObservableProperty]
private bool activated;
@@ -73,8 +69,4 @@ public partial class FilterNavigationViewModel<TWalletNavigation> :
public Task Handle(ActivatedEventArgs<Wallet> args) =>
Task.FromResult(Activated = true);
[RelayCommand]
public void Invoke() => Publisher.Publish(Notify.As(new Filter(Filter)),
nameof(ItemCollectionViewModel));
}