fix: does not register global shortcut when quick ask is disabled (#2592)
This commit is contained in:
parent
3b755f7e8c
commit
8926c13696
@ -83,6 +83,8 @@ app.on('second-instance', (_event, _commandLine, _workingDirectory) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
|
if (!getAppConfigurations().quick_ask) return
|
||||||
|
|
||||||
registerGlobalShortcuts()
|
registerGlobalShortcuts()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -119,8 +121,6 @@ function createMainWindow() {
|
|||||||
function registerGlobalShortcuts() {
|
function registerGlobalShortcuts() {
|
||||||
const ret = registerShortcut(quickAskHotKey, (selectedText: string) => {
|
const ret = registerShortcut(quickAskHotKey, (selectedText: string) => {
|
||||||
// Feature Toggle for Quick Ask
|
// Feature Toggle for Quick Ask
|
||||||
if (!getAppConfigurations().quick_ask) return
|
|
||||||
|
|
||||||
if (!windowManager.isQuickAskWindowVisible()) {
|
if (!windowManager.isQuickAskWindowVisible()) {
|
||||||
windowManager.showQuickAskWindow()
|
windowManager.showQuickAskWindow()
|
||||||
windowManager.sendQuickAskSelectedText(selectedText)
|
windowManager.sendQuickAskSelectedText(selectedText)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user