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

This commit is contained in:
Lucas Fernandes Nogueira 2022-06-30 10:39:25 -03:00 committed by GitHub
parent 185b0e314e
commit 63841c1060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

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

View File

@ -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