From 67c6a8b81d361af91c213a0682365842aa03f092 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 May 2017 16:02:13 +0100 Subject: [PATCH] Revert "unbreak stack overflow which fires on tests due to mocked timers" This reverts commit e69ea68133bb01dfd2093ffc5644edef24fbed70. --- src/components/views/rooms/RoomList.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index b86d17d290..d6e2ab633d 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -74,11 +74,7 @@ module.exports = React.createClass({ this.setState(s); // order of the sublists - //this.listOrder = []; - - // loop count to stop a stack overflow if the user keeps waggling the - // mouse for >30s in a row, or if running under mocha - this._delayedRefreshRoomListLoopCount = 0 + this.listOrder = []; }, componentDidMount: function() { @@ -288,12 +284,10 @@ module.exports = React.createClass({ // if the mouse has been moving over the RoomList in the last 500ms // then delay the refresh further to avoid bouncing around under the // cursor - if (Date.now() - this._lastMouseOverTs > 500 || this._delayedRefreshRoomListLoopCount > 60) { + if (Date.now() - this._lastMouseOverTs > 500) { this.refreshRoomList(); - this._delayedRefreshRoomListLoopCount = 0; } else { - this._delayedRefreshRoomListLoopCount++; this._delayedRefreshRoomList(); } }, 500),