From 60e43858a3c355a8c8f09ce0d379dced122c7995 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Mon, 30 Dec 2019 10:11:51 +0100 Subject: [PATCH] Update ShowHiddenChannels.plugin.js --- Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index c82b085cf3..cb62c8c550 100644 --- a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js +++ b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js @@ -3,7 +3,7 @@ class ShowHiddenChannels { getName () {return "ShowHiddenChannels";} - getVersion () {return "2.6.6";} + getVersion () {return "2.6.7";} getAuthor () {return "DevilBro";} @@ -11,8 +11,7 @@ class ShowHiddenChannels { constructor () { this.changelog = { - "fixed":[["Permission Changes","No longer allows or denies you to see a channel incorrectly after a permission update changed your access to a channel"],["Big gaps","Finally managed to sort out the bug that created huge gaps in the channel list"],["Flashing","Channel list no longer flashes and twitches when connectiong to a voice channel/collapsing a category/scrolling"]], - "improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"],["Sort", "You can now sort hidden channels in the native way, meaning they will be placed below their rightful category"],["Tooltip", "The tooltip was removed and was turned into a more friendly modal, which can be access via the right click menu on a channel"]] + "improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"] }; this.patchedModules = { @@ -118,6 +117,10 @@ class ShowHiddenChannels { return e.returnValue && !this.isChannelHidden(e.methodArguments[0]); }}); + BDFDB.ModuleUtils.patch(this, BDFDB.LibraryModules.UnreadChannelUtils, "getMentionCount", {after: e => { + return this.isChannelHidden(e.methodArguments[0]) ? 0 : e.returnValue; + }}); + BDFDB.ModuleUtils.patch(this, BDFDB.LibraryModules.CategoryCollapseStore, "isCollapsed", {after: e => { if (e.methodArguments[0] && e.methodArguments[0].endsWith("hidden")) return (BDFDB.DataUtils.load(this, "categorydata", "collapsed") || []).includes(e.methodArguments[0]); }});