1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00

Update lib.rs

This commit is contained in:
Puyodead1 2023-12-22 17:12:29 -05:00
parent a0cc376346
commit a0408f12eb
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -17,11 +17,7 @@ async fn close_splashscreen(window: tauri::Window) {
}
// Show main window
let main_window = window.get_window("main").unwrap();
main_window.show().unwrap();
// Open the dev tools automatically when debugging the application
#[cfg(debug_assertions)]
main_window.open_devtools();
window.get_window("main").unwrap().show().unwrap();
}
}
@ -77,6 +73,12 @@ pub fn run() {
tray::create_tray(handle)?;
}
// Open the dev tools automatically when debugging the application
#[cfg(debug_assertions)]
if let Some(main_window) = app.get_window("main") {
main_window.open_devtools();
};
Ok(())
})
.on_window_event(|event| match event.event() {