FIx autohide menubar functionality not working when a new window is created (#162)

This commit is contained in:
Agampreet Singh
2023-12-23 13:42:53 +05:30
parent a13d790df3
commit 92a7b9376d

View File

@@ -281,6 +281,11 @@ app.on("web-contents-created", (event, contents) => {
});
app.on("browser-window-created", (event, window) => {
if (getValue("autohide-menubar") === "true") {
window.setAutoHideMenuBar(true);
} else {
window.setAutoHideMenuBar(false);
}
window.webContents.on("did-finish-load", () => {
if (getValue("discordrpcstatus") === "true") {
setActivity(`On "${window.webContents.getTitle()}"`);