Explorar o código

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

Lucas Fernandes Nogueira %!s(int64=3) %!d(string=hai) anos
pai
achega
63841c1060
Modificáronse 2 ficheiros con 6 adicións e 1 borrados
  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