Don't lose invites when multiple are pending

pull/21833/head
Travis Ralston 2019-02-28 14:02:39 -07:00
parent 872cdaa9b3
commit 805676a511
1 changed files with 3 additions and 1 deletions

View File

@ -477,7 +477,9 @@ class RoomListStore extends Store {
room, category, this._state.lists[key], listsClone[key], lastTimestamp); room, category, this._state.lists[key], listsClone[key], lastTimestamp);
if (!pushedEntry) { if (!pushedEntry) {
if (listsClone[key].length === 0) { // Special case invites: they don't really have timelines and can easily get lost when
// the user has multiple pending invites. Pushing them is the least worst option.
if (listsClone[key].length === 0 || key === "im.vector.fake.invite") {
listsClone[key].push({room, category}); listsClone[key].push({room, category});
insertedIntoTags.push(key); insertedIntoTags.push(key);
} else { } else {