From a5b4d4ba95a24873c7243004776ab13158a77515 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 4 Mar 2019 10:56:18 -0700 Subject: [PATCH] Include tag name when warning about rooms running off lists --- src/stores/RoomListStore.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/RoomListStore.js b/src/stores/RoomListStore.js index 11b7494af4..fe3caaca9c 100644 --- a/src/stores/RoomListStore.js +++ b/src/stores/RoomListStore.js @@ -334,7 +334,7 @@ class RoomListStore extends Store { return tags; } - _slotRoomIntoList(room, category, existingEntries, newList, lastTimestampFn) { + _slotRoomIntoList(room, category, tag, existingEntries, newList, lastTimestampFn) { const targetCategoryIndex = CATEGORY_ORDER.indexOf(category); // The slotting algorithm works by trying to position the room in the most relevant @@ -432,7 +432,7 @@ class RoomListStore extends Store { } if (!pushedEntry && desiredCategoryBoundaryIndex >= 0) { - console.warn(`!! Room ${room.roomId} nearly lost: Ran off the end of the list`); + console.warn(`!! Room ${room.roomId} nearly lost: Ran off the end of ${tag}`); console.warn(`!! Inserting at position ${desiredCategoryBoundaryIndex} with category ${category}`); newList.splice(desiredCategoryBoundaryIndex, 0, {room, category}); pushedEntry = true; @@ -483,7 +483,7 @@ class RoomListStore extends Store { listsClone[key] = []; const pushedEntry = this._slotRoomIntoList( - room, category, this._state.lists[key], listsClone[key], lastTimestamp); + room, category, key, this._state.lists[key], listsClone[key], lastTimestamp); if (!pushedEntry) { // This should rarely happen: _slotRoomIntoList has several checks which attempt