From 321347fa6bf1d29648c8ec3eaaa27d10c1245e35 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Sat, 25 May 2024 23:53:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=80=81=E7=89=88=E6=9C=AC=20win10=20?= =?UTF-8?q?=E5=90=90=E5=8F=B8=E9=80=9A=E7=9F=A5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Helper/Notification/NotificationImplWpf.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/MaaWpfGui/Helper/Notification/NotificationImplWpf.cs b/src/MaaWpfGui/Helper/Notification/NotificationImplWpf.cs index d979d2f139..56535ec200 100644 --- a/src/MaaWpfGui/Helper/Notification/NotificationImplWpf.cs +++ b/src/MaaWpfGui/Helper/Notification/NotificationImplWpf.cs @@ -143,8 +143,9 @@ internal class NotificationImplWpf : INotificationPoster wpfcontent.RightButtonAction = () => ActionActivated?.Invoke(this, action.Tag); } - _notificationManager.Show(wpfcontent, expirationTime: expirationTime, ShowXbtn: false); - + Application.Current.Dispatcher.Invoke(() => + { + _notificationManager.Show(wpfcontent, expirationTime: expirationTime, ShowXbtn: false); + }); } - -} \ No newline at end of file +}