소스 검색

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