فهرست منبع

fix(tauri-runtime-wry): do not send theme twice on macOS, closes #4532 (#4540)

Lucas Fernandes Nogueira 3 سال پیش
والد
کامیت
63841c1060
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 5 0
      .changes/fix-macos-theme-getter.md
  2. 1 1
      core/tauri-runtime-wry/src/lib.rs

+ 5 - 0
.changes/fix-macos-theme-getter.md

@@ -0,0 +1,5 @@
+---
+"tauri-runtime-wry": patch
+---
+
+Send theme value only once on the getter function implementation on macOS.

+ 1 - 1
core/tauri-runtime-wry/src/lib.rs

@@ -2299,7 +2299,7 @@ fn handle_user_message<T: UserEvent>(
             WindowMessage::Theme(tx) => {
               #[cfg(any(windows, target_os = "macos"))]
               tx.send(map_theme(&window.theme())).unwrap();
-              #[cfg(not(windows))]
+              #[cfg(not(any(windows, target_os = "macos")))]
               tx.send(Theme::Light).unwrap();
             }
             // Setters