Improved event naming

This commit is contained in:
TheXamlGuy
2024-05-12 19:55:20 +01:00
parent 3ba21051bf
commit 105aa2da26
21 changed files with 111 additions and 60 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ public partial class App : Application
services.AddTemplate<ItemHeaderViewModel, ItemHeaderView>();
services.AddHandler<ItemConfigurationHandler>();
services.AddHandler<CreateItemHandler>();
});
})!);
+3 -3
View File
@@ -7,15 +7,15 @@ using Toolkit.Foundation;
namespace Bitvault.Avalonia;
public class AppHandler(IPublisher publisher) :
INotificationHandler<Started>
INotificationHandler<StartedEventArgs>
{
public async Task Handle(Started args, CancellationToken cancellationToken = default)
public async Task Handle(StartedEventArgs args, CancellationToken cancellationToken = default)
{
if (Application.Current is Application application)
{
if (application.ApplicationLifetime is IApplicationLifetime lifetime)
{
await publisher.Publish(new Navigate(lifetime is IClassicDesktopStyleApplicationLifetime ? "MainWindow" : "Main",
await publisher.Publish(new NavigateEventArgs(lifetime is IClassicDesktopStyleApplicationLifetime ? "MainWindow" : "Main",
lifetime is IClassicDesktopStyleApplicationLifetime ? typeof(IClassicDesktopStyleApplicationLifetime) :
typeof(ISingleViewApplicationLifetime)), cancellationToken);
}