From 7ef45901775ff90d510169bf36ff03552fcbbf09 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 2 Feb 2021 13:02:27 +0100 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 8 ++++---- Plugins/OldTitleBar/OldTitleBar.plugin.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index c48eb0ee27..85fcbdbf21 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -4148,12 +4148,12 @@ module.exports = (_ => { } }; BDFDB.DiscordUtils.getVersion = function () { - if (BDFDB.DiscordUtils.getBuilt.version) return BDFDB.DiscordUtils.getBuilt.version; + if (BDFDB.DiscordUtils.getVersion.version) return BDFDB.DiscordUtils.getVersion.version; else { let version = null; - try {version = LibraryRequires.electron.remote.app.getVersion();} - catch (err) {version = 400;} - BDFDB.DiscordUtils.getBuilt.version = version; + try {version = LibraryModules.WindowUtils.version.join(".");} + catch (err) {version = "999.999.999";} + BDFDB.DiscordUtils.getVersion.version = version; return version; } }; diff --git a/Plugins/OldTitleBar/OldTitleBar.plugin.js b/Plugins/OldTitleBar/OldTitleBar.plugin.js index fa22260f24..87ff44cd8b 100644 --- a/Plugins/OldTitleBar/OldTitleBar.plugin.js +++ b/Plugins/OldTitleBar/OldTitleBar.plugin.js @@ -176,7 +176,7 @@ module.exports = (_ => { id: "OldTitleBarNotifyBar", buttons: [{ contents: "Relaunch", - onClick: BDFDB.LibraryModules.WindowUtils.relaunch + onClick: _ => {BDFDB.LibraryModules.WindowUtils.relaunch();} }] }); } @@ -268,7 +268,7 @@ module.exports = (_ => { }; children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { className: BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable, - onClick: BDFDB.LibraryModules.WindowUtils.minimize, + onClick: _ => {BDFDB.LibraryModules.WindowUtils.minimize();}, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { className: BDFDB.disCN.channelheadericon, iconSVG: `` @@ -276,7 +276,7 @@ module.exports = (_ => { })); children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { className: BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable, - onClick: BDFDB.LibraryModules.WindowUtils.maximize, + onClick: _ => {BDFDB.LibraryModules.WindowUtils.maximize();}, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { className: BDFDB.disCN.channelheadericon, iconSVG: this.isMaximized() ? `` : `` @@ -284,7 +284,7 @@ module.exports = (_ => { })); children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { className: BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable, - onClick: BDFDB.LibraryModules.WindowUtils.close, + onClick: _ => {BDFDB.LibraryModules.WindowUtils.close();}, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { className: BDFDB.disCN.channelheadericon, iconSVG: ``