fix: conditionally register global shortcut

This commit is contained in:
ByteAtATime 2025-07-20 19:24:55 -07:00
parent 4effac66f7
commit be460d268f

View file

@ -184,7 +184,9 @@ fn setup_global_shortcut(app: &mut tauri::App) -> Result<(), Box<dyn std::error:
.build(),
)?;
app.global_shortcut().register(spotlight_shortcut)?;
if !app.global_shortcut().is_registered(spotlight_shortcut) {
app.global_shortcut().register(spotlight_shortcut)?;
}
Ok(())
}