fix(desktop): make action key settable even if custom shortcuts file is not set yet

This commit is contained in:
Michael Aaron Murphy 2024-07-01 18:34:08 +02:00
parent fc0e0458cf
commit d2cdadbd7f
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -225,9 +225,7 @@ fn super_key_set(action: shortcuts::action::System) {
return;
};
let Ok(mut shortcuts) = config.get::<Shortcuts>("custom") else {
return;
};
let mut shortcuts = config.get::<Shortcuts>("custom").unwrap_or_default();
shortcuts.0.insert(
Binding::new(shortcuts::Modifiers::new().logo(), None),