Browse Source

only raise urls opened event from classic lifetime if there are arguments.

pull/5639/head
Dan Walmsley 5 years ago
parent
commit
60f9408b45
  1. 7
      src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs

7
src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs

@ -103,7 +103,12 @@ namespace Avalonia.Controls.ApplicationLifetimes
public int Start(string[] args)
{
Startup?.Invoke(this, new ControlledApplicationLifetimeStartupEventArgs(args));
((IApplicationPlatformEvents)Application.Current).RaiseUrlsOpened(args);
if (args.Length > 0)
{
((IApplicationPlatformEvents)Application.Current).RaiseUrlsOpened(args);
}
_cts = new CancellationTokenSource();
MainWindow?.Show();
Dispatcher.UIThread.MainLoop(_cts.Token);

Loading…
Cancel
Save