From 070a1dad9d88b6b35087479a2ed188bf908e4f0b Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 24 May 2019 21:37:30 +0200 Subject: [PATCH] Update ShowHiddenChannels.plugin.js --- .../ShowHiddenChannels.plugin.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index abdc1c9283..e9ebcdf937 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.5.0";} + getVersion () {return "2.5.1";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class ShowHiddenChannels { initConstructor () { this.changelog = { - "improved":[["Channel Types","More accurately catches the types of hidden channels"],["Fallback","Added an icon/type fallback for new channel types"]] + "fixed":[["News/Store","Fixed the issue where News/Store channels were always marked as hidden"]] }; this.patchModules = { @@ -224,18 +224,11 @@ class ShowHiddenChannels { } } } - else { - let shownChannelsOfType = channel.type == 0 && shownChannels.SELECTABLE ? shownChannels.SELECTABLE : shownChannels[channel.type]; - if (shownChannelsOfType) for (let shownChannel of shownChannelsOfType) if (shownChannel.channel.id == channel.id) { - isHidden = false; - break; - } - } + if (BDFDB.isUserAllowedTo("VIEW_CHANNEL", BDFDB.myData.id, channel.id)) isHidden = false; if (isHidden) hiddenChannels[channel.type].push(channel); } } - var settings = BDFDB.getAllData(this, "settings"); var count = 0; for (let type in this.ChannelTypes) { @@ -305,7 +298,6 @@ class ShowHiddenChannels { if (!scroller || scroller.lastChild.previousSibling == category) return; category.remove(); let count = parseInt(scroller.lastChild.previousSibling.className.split("-")[1])+1; - category.className = "container-" + count + " container-hidden"; scroller.insertBefore(category, scroller.lastChild); } }