From 7c34d084662b86b256f4c72f093db4eba9396640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sun, 4 Feb 2024 00:23:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 3e5a65be..1096499d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -39,6 +39,14 @@ fn main() { .on_window_event(|event| window_event_handler(event)) .plugin(plugins::build_sql_plugin()) .plugin(plugins::build_log_plugin()) + .setup(|_app| { + let _window = _app.get_window("TeyvatGuide"); + #[cfg(debug_assertions)] + if _window.is_some() { + _window.unwrap().open_devtools(); + } + Ok(()) + }) .invoke_handler(tauri::generate_handler![ commands::init_app, commands::register_deep_link, @@ -47,14 +55,6 @@ fn main() { commands::get_dir_size, client::create_mhy_client, ]) - .setup(|_app| { - #[cfg(debug_assertions)] - let _window = _app.get_window("TeyvatGuide"); - if _window.is_some() { - _window.unwrap().open_devtools(); - } - Ok(()) - }) .run(tauri::generate_context!()) .expect("error while running tauri application"); }