From 6df8140cb1b7dfff0a7ab7a4db7c7cb531eb3483 Mon Sep 17 00:00:00 2001 From: huzibaca Date: Wed, 27 Nov 2024 14:27:16 +0800 Subject: [PATCH] chore: update --- src-tauri/src/utils/resolve.rs | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs index e068a46f..fc06ffd4 100644 --- a/src-tauri/src/utils/resolve.rs +++ b/src-tauri/src/utils/resolve.rs @@ -177,31 +177,7 @@ pub fn create_window() { .build() .unwrap(); - match window.restore_state(StateFlags::all()) { - Ok(_) => { - log::info!(target: "app", "window state restored successfully"); - } - Err(e) => { - log::error!(target: "app", "failed to restore window state: {}", e); - #[cfg(target_os = "windows")] - { - window.clone().on_window_event(move |_event| { - let _ = window.set_size(tauri::Size::Physical(tauri::PhysicalSize { - width: 890, - height: 700, - })); - }); - } - - #[cfg(not(target_os = "windows"))] - window - .set_size(tauri::Size::Physical(tauri::PhysicalSize { - width: 890, - height: 700, - })) - .unwrap(); - } - }; + log_err!(window.restore_state(StateFlags::all())); } pub async fn resolve_scheme(param: String) -> Result<()> {