From ae81b119fbb1da9e639a9f60f894fdfcbdc07de5 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 22 Jan 2019 14:24:47 +0100 Subject: [PATCH] Fixed bug where PinDMs doesnt add pinned DMs when the scroller isnt big enough to scroll down --- Plugins/PinDMs/PinDMs.plugin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Plugins/PinDMs/PinDMs.plugin.js b/Plugins/PinDMs/PinDMs.plugin.js index d55ad2454a..3328cde252 100644 --- a/Plugins/PinDMs/PinDMs.plugin.js +++ b/Plugins/PinDMs/PinDMs.plugin.js @@ -3,7 +3,7 @@ class PinDMs { getName () {return "PinDMs";} - getVersion () {return "1.2.7";} + getVersion () {return "1.2.8";} getAuthor () {return "DevilBro";} @@ -259,8 +259,11 @@ class PinDMs { } forceUpdateScroller (scroller) { - scroller.scrollTop += 10; - scroller.scrollTop -= 10; + if (this.updatingScroller) return; + this.updatingScroller = true; + var stateNode = BDFDB.getReactValue(scroller, "return.return.return.stateNode"); + if (stateNode) stateNode.updater.enqueueForceUpdate(stateNode); + setTimeout(() => {delete this.updatingScroller;},1000); } setLabelsByLanguage () {