From 69ba3c836b0ad8f93a4ea48a20c2a57f7e49110e Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Mon, 18 Apr 2022 07:38:29 +0200 Subject: [PATCH] Update ShowHiddenChannels.plugin.js --- .../ShowHiddenChannels/ShowHiddenChannels.plugin.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index 5e6b99edbd..5c5dd08e72 100644 --- a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js +++ b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js @@ -2,7 +2,7 @@ * @name ShowHiddenChannels * @author DevilBro * @authorId 278543574059057154 - * @version 3.0.7 + * @version 3.0.8 * @description Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible) * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,7 +17,7 @@ module.exports = (_ => { "info": { "name": "ShowHiddenChannels", "author": "DevilBro", - "version": "3.0.7", + "version": "3.0.8", "description": "Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)" } }; @@ -210,8 +210,7 @@ module.exports = (_ => { } onStart () { - let loadedBlackList = BDFDB.DataUtils.load(this, "blacklist"); - this.saveBlackList(!BDFDB.ArrayUtils.is(loadedBlackList) ? [] : loadedBlackList); + this.saveBlackList(this.getBlackList()); let loadedCollapseList = BDFDB.DataUtils.load(this, "categorydata"); this.saveCollapseList(!BDFDB.ArrayUtils.is(loadedCollapseList) ? [] : loadedCollapseList); @@ -550,6 +549,12 @@ module.exports = (_ => { else this.saveBlackList([]); BDFDB.PluginUtils.refreshSettingsPanel(this, settingsPanel, collapseStates); } + + getBlackList () { + let loadedBlackList = BDFDB.DataUtils.load(this, "blacklist"); + return !BDFDB.ArrayUtils.is(loadedBlackList) ? [] : loadedBlackList; + + } saveBlackList (savedBlackList) { blackList = savedBlackList;