fix: potentially fix shortcuts not working sometimes
Also potentially fixed crashes as some shortcuts would execute code that should run on the main thread, from other threads
This commit is contained in:
1 parent
fa1095e83c
commit
8d833f5163
1 file changed
+1
-7
@@ -88,13 +88,7 @@ class GeneralTab: NSViewController, PreferencePane {
|
||||
App.app.appIsBeingUsed = false
|
||||
App.app.isFirstSummon = true
|
||||
}
|
||||
let fn = shortcutsActionsBlocks[controlId]!
|
||||
let isShortcutAffectingTheUi = ["previousWindowShortcut", "nextWindowShortcut", "←", "→", "↑", "↓", "holdShortcut"].contains(controlId)
|
||||
if isShortcutAffectingTheUi || isShortcutClosingTheUi {
|
||||
DispatchQueue.main.async { () -> () in fn() }
|
||||
} else {
|
||||
fn()
|
||||
}
|
||||
DispatchQueue.main.async { () -> () in shortcutsActionsBlocks[controlId]!() }
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user