From 5667eac78136b1e722830736f64d2d13ecc36b08 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 9 May 2019 11:37:07 +0200 Subject: [PATCH] Update ServerHider.plugin.js --- Plugins/ServerHider/ServerHider.plugin.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Plugins/ServerHider/ServerHider.plugin.js b/Plugins/ServerHider/ServerHider.plugin.js index ce4ed977f1..c8f22f3948 100644 --- a/Plugins/ServerHider/ServerHider.plugin.js +++ b/Plugins/ServerHider/ServerHider.plugin.js @@ -279,7 +279,13 @@ class ServerHider { } unreadServer (id) { - if (BDFDB.getData("clearNotifications", this, "settings")) BDFDB.markGuildAsRead(id); + if (BDFDB.getData("clearNotifications", this, "settings") && this.isInFolder(id)) BDFDB.markGuildAsRead(id); + } + + isInFolder (id) { + if (!BDFDB.isPluginEnabled("ServerFolders")) return false; + for (let folder in BDFDB.loadAllData(this, "folders")) if ((folder.servers || []).includes(id)) return true; + return false; } setLabelsByLanguage () {