Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

fix(rust): suppress unused variable warnings on non-macOS platforms

Tw939b548c38a2d1
diff --git a/src-tauri/src/app/invoke.rs b/src-tauri/src/app/invoke.rs
index f5c8f4a1..97d7a9b5 100644
--- a/src-tauri/src/app/invoke.rs
+++ b/src-tauri/src/app/invoke.rs
@@ -117,9 +117,9 @@ pub fn send_notification(app: AppHandle, params: NotificationParams) -> Result<(
#[command]
pub async fn update_theme_mode(app: AppHandle, mode: String) {
- let window = app.get_webview_window("pake").unwrap();
#[cfg(target_os = "macos")]
{
+ let window = app.get_webview_window("pake").unwrap();
let theme = if mode == "dark" {
Theme::Dark
} else {
@@ -127,6 +127,11 @@ pub async fn update_theme_mode(app: AppHandle, mode: String) {
};
let _ = window.set_theme(Some(theme));
}
+ #[cfg(not(target_os = "macos"))]
+ {
+ let _ = app;
+ let _ = mode;
+ }
}
#[command]