Skip to content

Commit

Permalink
#9032
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 30, 2023
1 parent 54aae54 commit c1478c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ app.whenReady().then(() => {
});
});
} else {
globalShortcut.register(data.hotkey, () => {
globalShortcut.register(shortcut, () => {
BrowserWindow.getAllWindows().forEach(itemB => {
itemB.webContents.send("siyuan-hotkey", {
hotkey: item
Expand Down
6 changes: 4 additions & 2 deletions app/src/boot/onGetConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export const onGetConfig = (isStart: boolean, app: App) => {
id: getCurrentWindow().id,
port: location.port
});
sendGlobalShortcut(app);
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
/// #endif
if (!window.siyuan.config.uiLayout || (window.siyuan.config.uiLayout && !window.siyuan.config.uiLayout.left)) {
Expand All @@ -127,6 +126,9 @@ export const onGetConfig = (isStart: boolean, app: App) => {
window.siyuan.emojis = response.data as IEmoji[];
try {
JSONToLayout(app, isStart);
/// #if !BROWSER
sendGlobalShortcut(app);
/// #endif
openChangelog();
} catch (e) {
resetLayout();
Expand Down Expand Up @@ -309,7 +311,7 @@ export const initWindow = (app: App) => {
let matchCommand = false;
app.plugins.find(item => {
item.commands.find(command => {
if (command.globalCallback && data === command.customHotkey) {
if (command.globalCallback && data.hotkey === command.customHotkey) {
matchCommand = true;
command.globalCallback();
return true;
Expand Down

0 comments on commit c1478c2

Please sign in to comment.