lint 4
This commit is contained in:
parent
ea5054395b
commit
ecfb98b6db
2 changed files with 4 additions and 6 deletions
|
|
@ -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")]
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue