fix in-app-menu hideMenu on launch

This commit is contained in:
Araxeus
2021-04-03 22:34:12 +03:00
parent 70b03b71e4
commit 1cae35a62b

View File

@ -38,17 +38,15 @@ module.exports = (winImport) => {
done = true; done = true;
setApplicationMenu(win); setApplicationMenu(win);
//fix bug when loading window with no internet connection
switchMenuVisibility();
//register keyboard shortcut && hide menu if hideMenu is enabled //register keyboard shortcut && hide menu if hideMenu is enabled
if (config.get("options.hideMenu")) { if (config.get("options.hideMenu")) {
visible = false; switchMenuVisibility();
electronLocalshortcut.register(win, "Esc", () => { electronLocalshortcut.register(win, "Esc", () => {
switchMenuVisibility(); switchMenuVisibility();
}); });
} }
// fix bug with menu not applying on start // fix bug with menu not applying on start when no internet connection available
setMenuVisibility(visible); setMenuVisibility(visible);
}); });
}; };