mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Merge pull request #2741 from matrix-org/travis/rls-debugging
Include tag name when warning about rooms running off lists
This commit is contained in:
commit
534ca0e18a
1 changed files with 3 additions and 3 deletions
|
@ -334,7 +334,7 @@ class RoomListStore extends Store {
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
_slotRoomIntoList(room, category, existingEntries, newList, lastTimestampFn) {
|
_slotRoomIntoList(room, category, tag, existingEntries, newList, lastTimestampFn) {
|
||||||
const targetCategoryIndex = CATEGORY_ORDER.indexOf(category);
|
const targetCategoryIndex = CATEGORY_ORDER.indexOf(category);
|
||||||
|
|
||||||
// The slotting algorithm works by trying to position the room in the most relevant
|
// 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) {
|
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}`);
|
console.warn(`!! Inserting at position ${desiredCategoryBoundaryIndex} with category ${category}`);
|
||||||
newList.splice(desiredCategoryBoundaryIndex, 0, {room, category});
|
newList.splice(desiredCategoryBoundaryIndex, 0, {room, category});
|
||||||
pushedEntry = true;
|
pushedEntry = true;
|
||||||
|
@ -483,7 +483,7 @@ class RoomListStore extends Store {
|
||||||
listsClone[key] = [];
|
listsClone[key] = [];
|
||||||
|
|
||||||
const pushedEntry = this._slotRoomIntoList(
|
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) {
|
if (!pushedEntry) {
|
||||||
// This should rarely happen: _slotRoomIntoList has several checks which attempt
|
// This should rarely happen: _slotRoomIntoList has several checks which attempt
|
||||||
|
|
Loading…
Reference in a new issue