Improve Publisher
This commit is contained in:
@@ -8,8 +8,7 @@ namespace Toolkit.Avalonia;
|
||||
public class ClassicDesktopStyleApplicationHandler :
|
||||
INavigateHandler<IClassicDesktopStyleApplicationLifetime>
|
||||
{
|
||||
public Task Handle(NavigateEventArgs<IClassicDesktopStyleApplicationLifetime> args,
|
||||
CancellationToken cancellationToken = default)
|
||||
public Task Handle(NavigateEventArgs<IClassicDesktopStyleApplicationLifetime> args)
|
||||
{
|
||||
if (Application.Current?.ApplicationLifetime is
|
||||
IClassicDesktopStyleApplicationLifetime lifeTime)
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace Toolkit.Avalonia;
|
||||
public class ContentControlHandler :
|
||||
INavigateHandler<ContentControl>
|
||||
{
|
||||
public async Task Handle(NavigateEventArgs<ContentControl> args,
|
||||
CancellationToken cancellationToken)
|
||||
public async Task Handle(NavigateEventArgs<ContentControl> args)
|
||||
{
|
||||
if (args.Context is ContentControl contentControl)
|
||||
{
|
||||
|
||||
@@ -6,8 +6,7 @@ namespace Toolkit.Avalonia;
|
||||
public class ContentDialogHandler(IDispatcher dispatcher) :
|
||||
INavigateHandler<ContentDialog>
|
||||
{
|
||||
public async Task Handle(NavigateEventArgs<ContentDialog> args,
|
||||
CancellationToken cancellationToken)
|
||||
public async Task Handle(NavigateEventArgs<ContentDialog> args)
|
||||
{
|
||||
if (args.Context is ContentDialog contentDialog)
|
||||
{
|
||||
@@ -86,7 +85,7 @@ public class ContentDialogHandler(IDispatcher dispatcher) :
|
||||
}
|
||||
|
||||
// A hack to wait for the dialog to finish loading up to make it appear more responsive
|
||||
await Task.Delay(250, cancellationToken);
|
||||
await Task.Delay(250);
|
||||
if (content is IInitializer initializer)
|
||||
{
|
||||
await initializer.Initialize();
|
||||
|
||||
@@ -12,8 +12,7 @@ public class FrameHandler :
|
||||
INavigateHandler<Frame>,
|
||||
INavigateBackHandler<Frame>
|
||||
{
|
||||
public Task Handle(NavigateEventArgs<Frame> args,
|
||||
CancellationToken cancellationToken)
|
||||
public Task Handle(NavigateEventArgs<Frame> args)
|
||||
{
|
||||
if (args.Context is Frame frame)
|
||||
{
|
||||
@@ -136,8 +135,7 @@ public class FrameHandler :
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task Handle(NavigateBackEventArgs<Frame> args,
|
||||
CancellationToken cancellationToken = default)
|
||||
public Task Handle(NavigateBackEventArgs<Frame> args)
|
||||
{
|
||||
if (args.Context is Frame frame)
|
||||
{
|
||||
|
||||
@@ -8,8 +8,7 @@ namespace Toolkit.Avalonia;
|
||||
public class SingleViewApplicationHandler :
|
||||
INavigateHandler<ISingleViewApplicationLifetime>
|
||||
{
|
||||
public Task Handle(NavigateEventArgs<ISingleViewApplicationLifetime> args,
|
||||
CancellationToken cancellationToken = default)
|
||||
public Task Handle(NavigateEventArgs<ISingleViewApplicationLifetime> args)
|
||||
{
|
||||
if (Application.Current?.ApplicationLifetime is
|
||||
ISingleViewApplicationLifetime lifeTime)
|
||||
|
||||
Reference in New Issue
Block a user