refactor: centralize shortcut recording lifetime
This commit is contained in:
@@ -33,7 +33,7 @@ func duplicateGlobalBindingIsRejectedWhileSuspendedWithoutChangingSavedBinding()
|
||||
defaults.set(candidate.storedValue, forKey: "globalActivationShortcut")
|
||||
defaults.set(previous.storedValue, forKey: "globalCommandShortcut.emoji")
|
||||
let shortcuts = GlobalShortcuts(defaults: defaults) { _ in }
|
||||
shortcuts.suspend()
|
||||
shortcuts.beginRecording()
|
||||
|
||||
do {
|
||||
try shortcuts.setShortcut(candidate, at: emojiIndex)
|
||||
|
||||
Reference in New Issue
Block a user