refactor: unify and simplify the call of app_handle(2)

This commit is contained in:
huzibaca
2024-09-23 23:15:51 +08:00
parent 8a3a094414
commit a3465d292c
12 changed files with 39 additions and 62 deletions

View File

@@ -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);