Skip to content

Commit

Permalink
Remove weird dispatcher invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
Neakita committed Oct 24, 2024
1 parent 2aed265 commit 406c990
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions SightKeeper.Avalonia/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Threading;
using Serilog;

namespace SightKeeper.Avalonia;
Expand Down Expand Up @@ -37,8 +36,7 @@ public static void Main(string[] args)

private static void OnTaskSchedulerUnobservedException(object? sender, UnobservedTaskExceptionEventArgs e)
{
// TODO should it really use dispatcher?
Dispatcher.UIThread.InvokeAsync(() => LogUnhandledExceptions(e.Exception, nameof(TaskScheduler)), DispatcherPriority.Normal);
LogUnhandledExceptions(e.Exception, nameof(TaskScheduler));
}

// Avalonia configuration, don't remove; also used by visual designer.
Expand Down

0 comments on commit 406c990

Please sign in to comment.