feat: add window-state management and recovery functionality (#3792)

* feat: add window-state management and recovery functionality

* fix: correct file name reference for window-state.json in uninstall section

* fix: remove unused tauri_plugin_window_state import
This commit is contained in:
Tunglies
2025-06-18 02:21:00 +08:00
committed by GitHub
parent c8ae37811c
commit c40c1960ed
3 changed files with 16 additions and 4 deletions

View File

@@ -162,6 +162,14 @@ pub fn run() {
});
});
// 窗口管理
logging!(info, Type::Setup, true, "初始化窗口状态管理...");
let window_state_plugin = tauri_plugin_window_state::Builder::new()
.with_filename("window_state.json")
.with_state_flags(tauri_plugin_window_state::StateFlags::default())
.build();
let _ = app.handle().plugin(window_state_plugin);
// 异步处理
let app_handle = app.handle().clone();
AsyncHandler::spawn(move || async move {