mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:43:44 +08:00
fix: windows cannot save window state
This commit is contained in:
parent
18b0c3f7aa
commit
95b7641f9c
@ -124,6 +124,7 @@ pub fn quit(code: Option<i32>) {
|
||||
resolve::restore_public_dns().await;
|
||||
});
|
||||
|
||||
log_err!(app_handle.save_window_state(StateFlags::default()));
|
||||
app_handle.exit(code.unwrap_or(0));
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,6 @@ use crate::core::hotkey;
|
||||
use crate::utils::{resolve, resolve::resolve_scheme, server};
|
||||
#[cfg(target_os = "macos")]
|
||||
use tauri::Listener;
|
||||
use tauri_plugin_window_state::{AppHandleExt, StateFlags};
|
||||
|
||||
pub fn run() {
|
||||
// 单例检测
|
||||
@ -147,8 +146,6 @@ pub fn run() {
|
||||
api.prevent_exit();
|
||||
return;
|
||||
}
|
||||
let app_hanele = core::handle::Handle::global().app_handle().unwrap();
|
||||
let _ = app_hanele.save_window_state(StateFlags::default());
|
||||
}
|
||||
tauri::RunEvent::WindowEvent { label, event, .. } => {
|
||||
if label == "main" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user