From bd518aea01c10e395bf1724c8cee3fb7ee2a9fdf Mon Sep 17 00:00:00 2001 From: SirStendec Date: Wed, 15 Nov 2017 14:48:57 -0500 Subject: [PATCH] A few more scroller changes. --- src/sites/twitch-twilight/modules/chat/scroller.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sites/twitch-twilight/modules/chat/scroller.js b/src/sites/twitch-twilight/modules/chat/scroller.js index fde3a3ee..928c532a 100644 --- a/src/sites/twitch-twilight/modules/chat/scroller.js +++ b/src/sites/twitch-twilight/modules/chat/scroller.js @@ -67,7 +67,7 @@ export default class Scroller extends Module { old_scroll = cls.prototype.scrollToBottom; cls.prototype.scrollToBottom = function() { - if ( ! this.state.ffzFrozen ) + if ( ! this.ffz_freeze_enabled || ! this.state.ffzFrozen ) return old_scroll.call(this); } @@ -147,10 +147,7 @@ export default class Scroller extends Module { if ( ! this._ffz_interval ) this._ffz_interval = setInterval(() => { if ( ! this.ffzShouldBeFrozen() ) - requestAnimationFrame(() => { - if ( ! this.ffzShouldBeFrozen() ) - this.ffzUnfreeze(); - }); + this.ffzMaybeUnfreeze(); }, 200); this.ffz_frozen = true;