From 0d4bbb4c07b45e66e03b044da4692c5e694b8e5d Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:12:12 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20wpf=20Win10+Toast=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=B3=BB=E7=BB=9F=E5=86=85=E7=BD=AE=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=A3=B0=E8=80=8C=E4=B8=8D=E6=98=AF=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Helper/ToastNotification.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/MaaWpfGui/Helper/ToastNotification.cs b/src/MaaWpfGui/Helper/ToastNotification.cs index cfaf1eb29d..1df2b4611f 100644 --- a/src/MaaWpfGui/Helper/ToastNotification.cs +++ b/src/MaaWpfGui/Helper/ToastNotification.cs @@ -267,7 +267,7 @@ namespace MaaWpfGui.Helper #region 通知按钮变量 - private List _actions = new List(); + private List _actions = []; #endregion 通知按钮变量 @@ -345,8 +345,10 @@ namespace MaaWpfGui.Helper // 显示通知 _notificationPoster.ShowNotification(content); - // 播放通知提示音 - PlayNotificationSound(sound); + if (_notificationPoster is not NotificationImplWinRT) + { + PlayNotificationSound(sound); // 播放通知提示音 + } // 任务栏闪烁 FlashWindowEx();