mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-25 21:22:20 +08:00
@@ -397,7 +397,13 @@ pub fn run() {
|
||||
}
|
||||
}),
|
||||
#[allow(unused_variables)]
|
||||
tauri::RunEvent::ExitRequested { api, code, .. } => {
|
||||
tauri::RunEvent::ExitRequested { api, code, .. }
|
||||
if module::lightweight::is_in_lightweight_mode() && !handle::Handle::global().is_exiting() =>
|
||||
{
|
||||
{
|
||||
api.prevent_exit();
|
||||
}
|
||||
|
||||
// TODO: Migrate the cleanup logic from RunEvent::Exit to RunEvent::ExitRequested.
|
||||
// This lets us call api.prevent_exit(), run async cleanup first,
|
||||
// and then call app_handle.exit(code) after cleanup has completed.
|
||||
|
||||
Reference in New Issue
Block a user