From e915d7e2156a416ed7e046356f87d18c81a476e9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 25 Feb 2016 11:06:47 +0000 Subject: [PATCH] Change some refreshRoomList() calls to dalyed ones to avoid hammering on catchup. Fixes https://github.com/vector-im/vector-web/issues/544 --- src/components/views/rooms/RoomList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 07ed450ef2..9a7396097f 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -127,7 +127,7 @@ module.exports = React.createClass({ onRoomTimeline: function(ev, room, toStartOfTimeline) { if (toStartOfTimeline) return; - this.refreshRoomList(); + this._delayedRefreshRoomList(); }, onRoomReceipt: function(receiptEvent, room) { @@ -137,7 +137,7 @@ module.exports = React.createClass({ for (var i = 0; i < receiptKeys.length; ++i) { var rcpt = receiptEvent.getContent()[receiptKeys[i]]; if (rcpt['m.read'] && rcpt['m.read'][MatrixClientPeg.get().credentials.userId]) { - this.refreshRoomList(); + this._delayedRefreshRoomList(); break; } }