From 507eb8051467190ebb3faea8c0b90877ffca27de Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 25 Jul 2023 12:58:45 +0200 Subject: [PATCH] Update PinDMs.plugin.js --- Plugins/PinDMs/PinDMs.plugin.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Plugins/PinDMs/PinDMs.plugin.js b/Plugins/PinDMs/PinDMs.plugin.js index d6647c6ac6..52f0ba0f63 100644 --- a/Plugins/PinDMs/PinDMs.plugin.js +++ b/Plugins/PinDMs/PinDMs.plugin.js @@ -2,7 +2,7 @@ * @name PinDMs * @author DevilBro * @authorId 278543574059057154 - * @version 1.9.8 + * @version 1.9.9 * @description Allows you to pin DMs, making them appear at the top of your DMs/ServerList * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -59,6 +59,8 @@ module.exports = (_ => { var hoveredCategory, draggedCategory, releasedCategory; var hoveredChannel, draggedChannel, releasedChannel; + var channelListIsRenderendering; + return class PinDMs extends Plugin { onLoad () { this.defaults = { @@ -903,7 +905,9 @@ module.exports = (_ => { updateContainer (type) { switch (type) { case "channelList": - this.forceUpdateAll(); + if (channelListIsRenderendering) BDFDB.DiscordUtils.rerenderAll(true); + channelListIsRenderendering = true; + BDFDB.TimeUtils.timeout(_ => channelListIsRenderendering = false, 3000); break; case "guildList": BDFDB.DiscordUtils.rerenderAll(true);