fix: When the shortcut key closes the window, the window is minimized

This commit is contained in:
huzibaca 2024-11-16 04:46:20 +08:00
parent c16ae89a3d
commit 3f79e42628

View File

@ -21,7 +21,7 @@ use tauri_plugin_window_state::{AppHandleExt, StateFlags};
pub fn open_or_close_dashboard() {
if let Some(window) = handle::Handle::global().get_window() {
if let Ok(true) = window.is_focused() {
let _ = window.minimize();
let _ = window.hide();
return;
}
}