Worlds fastest rename

This commit is contained in:
TheXamlGuy
2024-06-09 13:47:58 +01:00
parent 727bf877e9
commit 1f777e19cd
71 changed files with 282 additions and 282 deletions
@@ -0,0 +1,41 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Toolkit.Foundation;
namespace Bitvault;
public partial class FilterWalletNavigationViewModel : Observable,
IWalletNavigationViewModel,
INotificationHandler<ActivatedEventArgs<Wallet>>,
INotificationHandler<DeactivatedEventArgs<Wallet>>
{
[ObservableProperty]
private bool activated;
[ObservableProperty]
private string? filter;
[ObservableProperty]
private bool selected;
public FilterWalletNavigationViewModel(IServiceProvider provider,
IServiceFactory factory,
IMediator mediator,
IPublisher publisher,
ISubscription subscriber,
IDisposer disposer,
string? filter = null) : base(provider, factory, mediator, publisher, subscriber, disposer)
{
Filter = filter;
}
public Task Handle(DeactivatedEventArgs<Wallet> args) =>
Task.FromResult(Activated = false);
public Task Handle(ActivatedEventArgs<Wallet> args) =>
Task.FromResult(Activated = true);
[RelayCommand]
public void Invoke() => Publisher.Publish(Notify.As(new Filter(Filter)),
nameof(ItemCollectionViewModel));
}