We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d03a65b commit 9c1b00bCopy full SHA for 9c1b00b
1 file changed
StabilityMatrix.Avalonia/Services/NotificationService.cs
@@ -45,16 +45,13 @@ public void Initialize(
45
};
46
}
47
48
- public void Show(INotification notification)
49
-{
50
- // Must marshal to UI thread - WindowNotificationManager requires it
51
- if (Dispatcher.UIThread.CheckAccess())
+ public void Show(INotification notification)
52
{
53
- notificationManager?.Show(notification);
+ // Must marshal to UI thread - WindowNotificationManager requires it
+ Dispatcher.UIThread.Invoke(() => notificationManager?.Show(notification));
54
55
- else
56
57
- Dispatcher.UIThread.Post(() => notificationManager?.Show(notification));
+ notificationManager?.Show(notification);
58
59
60
0 commit comments