mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
refactor: unify and simplify the call of app_handle(2)
This commit is contained in:
@@ -10,7 +10,6 @@ use crate::log_err;
|
||||
use crate::utils::resolve;
|
||||
use anyhow::{bail, Result};
|
||||
use serde_yaml::{Mapping, Value};
|
||||
use tauri::AppHandle;
|
||||
use tauri_plugin_clipboard_manager::ClipboardExt;
|
||||
|
||||
// 打开面板
|
||||
@@ -100,7 +99,7 @@ pub fn toggle_tun_mode() {
|
||||
}
|
||||
|
||||
pub fn quit() {
|
||||
let app_handle: AppHandle = handle::Handle::global().app_handle().unwrap();
|
||||
let app_handle = handle::Handle::global().app_handle().unwrap();
|
||||
let _ = resolve::save_window_size_position(true);
|
||||
resolve::resolve_reset();
|
||||
app_handle.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user