Revert "fix: ensure app state is saved on exit and window events for better state management"
This reverts commit 9af0803e9b.
chore: update UPDATELOG
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
- 修复 .window-state.json 无法删除的问题
|
- 修复 .window-state.json 无法删除的问题
|
||||||
- 无法修改配置更新 HTTP 请求超时
|
- 无法修改配置更新 HTTP 请求超时
|
||||||
- 修复 getDelayFix 钩子问题
|
- 修复 getDelayFix 钩子问题
|
||||||
|
- 使用外部扩展脚本覆写代理组时首页无法显示代理组
|
||||||
|
|
||||||
#### 新增了:
|
#### 新增了:
|
||||||
- Mihomo(Meta)内核升级至 1.19.8
|
- Mihomo(Meta)内核升级至 1.19.8
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
"autostart:allow-enable",
|
"autostart:allow-enable",
|
||||||
"autostart:allow-disable",
|
"autostart:allow-disable",
|
||||||
"autostart:allow-is-enabled",
|
"autostart:allow-is-enabled",
|
||||||
"core:window:allow-set-theme",
|
"core:window:allow-set-theme"
|
||||||
"window-state:default"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,26 +342,12 @@ pub fn run() {
|
|||||||
if code.is_none() {
|
if code.is_none() {
|
||||||
api.prevent_exit();
|
api.prevent_exit();
|
||||||
}
|
}
|
||||||
if let Some(app_handle) = core::handle::Handle::global().app_handle() {
|
|
||||||
logging_error!(
|
|
||||||
Type::Window,
|
|
||||||
true,
|
|
||||||
app_handle.save_window_state(StateFlags::all())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
tauri::RunEvent::Exit => {
|
tauri::RunEvent::Exit => {
|
||||||
// avoid duplicate cleanup
|
// avoid duplicate cleanup
|
||||||
if core::handle::Handle::global().is_exiting() {
|
if core::handle::Handle::global().is_exiting() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if let Some(app_handle) = core::handle::Handle::global().app_handle() {
|
|
||||||
logging_error!(
|
|
||||||
Type::Window,
|
|
||||||
true,
|
|
||||||
app_handle.save_window_state(StateFlags::all())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
feat::clean();
|
feat::clean();
|
||||||
}
|
}
|
||||||
tauri::RunEvent::WindowEvent { label, event, .. } => {
|
tauri::RunEvent::WindowEvent { label, event, .. } => {
|
||||||
@@ -380,13 +366,6 @@ pub fn run() {
|
|||||||
} else {
|
} else {
|
||||||
logging!(warn, Type::Window, true, "尝试隐藏窗口但窗口不存在");
|
logging!(warn, Type::Window, true, "尝试隐藏窗口但窗口不存在");
|
||||||
}
|
}
|
||||||
if let Some(app_handle) = core::handle::Handle::global().app_handle() {
|
|
||||||
logging_error!(
|
|
||||||
Type::Window,
|
|
||||||
true,
|
|
||||||
app_handle.save_window_state(StateFlags::all())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
tauri::WindowEvent::Focused(true) => {
|
tauri::WindowEvent::Focused(true) => {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
@@ -450,13 +429,6 @@ pub fn run() {
|
|||||||
hotkey::Hotkey::global().unregister("CMD+W")
|
hotkey::Hotkey::global().unregister("CMD+W")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if let Some(app_handle) = core::handle::Handle::global().app_handle() {
|
|
||||||
logging_error!(
|
|
||||||
Type::Window,
|
|
||||||
true,
|
|
||||||
app_handle.save_window_state(StateFlags::all())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,4 +74,4 @@
|
|||||||
"csp": null
|
"csp": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user