File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -488,7 +488,8 @@ private static async Task<IClipboard> GetOrCreateClipboardWindowAsync()
488488 }
489489 CancellationTokenSource ? _pollingCts = null ;
490490
491- public override void OnFrameworkInitializationCompleted ( )
491+ // ReSharper disable once AsyncVoidMethod
492+ public override async void OnFrameworkInitializationCompleted ( )
492493 {
493494 // Crashes must be contained, AT ALL COSTS!
494495 Dispatcher . UIThread . UnhandledException += ( s , e ) =>
@@ -560,12 +561,9 @@ public override void OnFrameworkInitializationCompleted()
560561 // DebugHelper.Logger.Debug($"Avalonia Args: {desktop.Args}");
561562 try
562563 {
563- Task . Run ( ( ) => SnapX . start ( desktop . Args ?? [ ] ) ) . GetAwaiter ( ) . GetResult ( ) ;
564+ SnapX . start ( desktop . Args ?? [ ] ) ;
564565 var CLIManager = SnapX . GetCLIManager ( ) ;
565- Task . Run ( ( ) => CLIManager . UseCommandLineArgs ( ) . GetAwaiter ( ) . GetResult ( ) )
566- . ConfigureAwait ( false )
567- . GetAwaiter ( )
568- . GetResult ( ) ;
566+ await CLIManager . UseCommandLineArgs ( ) ;
569567 }
570568 catch ( Exception ex )
571569 {
You can’t perform that action at this time.
0 commit comments