Update ServerHider.plugin.js

This commit is contained in:
Mirco Wittrien 2022-12-02 10:44:45 +01:00
parent cb001c9883
commit b461023c69
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ module.exports = (_ => {
}});
BDFDB.PatchUtils.patch(this, BDFDB.LibraryStores.GuildReadStateStore, "getMutableGuildStates", {after: e => {
if (!e.returnValue) return;
if (!e.returnValue || this.settings.general.onlyHideInStream && !BDFDB.LibraryStores.StreamerModeStore.enabled) return;
let hiddenGuildIds = hiddenEles && hiddenEles.servers || [];
if (hiddenGuildIds.length) for (let id in e.returnValue) if (hiddenGuildIds.includes(id)) e.returnValue[id] = Object.assign({}, e.returnValue[id], {mentionCount: 0, mentionCounts: {}});
}});