This commit is contained in:
Wyvest 2026-02-25 10:36:48 -05:00
parent ea5054395b
commit ecfb98b6db
2 changed files with 4 additions and 6 deletions

View file

@ -132,8 +132,7 @@ fn setup_window(handle: &tauri::AppHandle) -> Result<(), Box<dyn std::error::Err
#[allow(unused_variables)] #[allow(unused_variables)]
let app_handle = handle.clone(); let app_handle = handle.clone();
tokio::task::spawn(async move { tokio::task::spawn(async move {
if let Ok(state) = State::get().await { if State::get().await.is_ok() {
let _settings = state.settings.read().await;
// native_window_frame=true means use native decorations // native_window_frame=true means use native decorations
// native_window_frame=false means use custom frame (no decorations) // native_window_frame=false means use custom frame (no decorations)
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]

View file

@ -131,7 +131,8 @@ fn setup_window(handle: &tauri::AppHandle) -> Result<(), Box<dyn std::error::Err
let app_handle = handle.clone(); let app_handle = handle.clone();
tokio::task::spawn(async move { tokio::task::spawn(async move {
if let Ok(state) = State::get().await { if let Ok(state) = State::get().await {
let _settings = state.settings.read().await; #[allow(unused_variables)]
let settings = state.settings.read().await;
// native_window_frame=true means use native decorations // native_window_frame=true means use native decorations
// native_window_frame=false means use custom frame (no decorations) // native_window_frame=false means use custom frame (no decorations)
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
@ -171,9 +172,7 @@ fn setup_window(handle: &tauri::AppHandle) -> Result<(), Box<dyn std::error::Err
} }
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]
win_clone win_clone.set_decorations(settings.native_window_frame).ok();
.set_decorations(_settings.native_window_frame)
.ok();
} }
win_clone.show().ok(); win_clone.show().ok();
}); });