mirror of https://github.com/vector-im/riot-web
Merge pull request #4916 from matrix-org/travis/room-list/dm-handle
Ensure DMs are not lost in the new room list, and clean up tag loggingpull/21833/head
commit
3dfb9711ed
|
@ -501,13 +501,9 @@ export class Algorithm extends EventEmitter {
|
||||||
// Split out the easy rooms first (leave and invite)
|
// Split out the easy rooms first (leave and invite)
|
||||||
const memberships = splitRoomsByMembership(rooms);
|
const memberships = splitRoomsByMembership(rooms);
|
||||||
for (const room of memberships[EffectiveMembership.Invite]) {
|
for (const room of memberships[EffectiveMembership.Invite]) {
|
||||||
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
|
||||||
console.log(`[DEBUG] "${room.name}" (${room.roomId}) is an Invite`);
|
|
||||||
newTags[DefaultTagID.Invite].push(room);
|
newTags[DefaultTagID.Invite].push(room);
|
||||||
}
|
}
|
||||||
for (const room of memberships[EffectiveMembership.Leave]) {
|
for (const room of memberships[EffectiveMembership.Leave]) {
|
||||||
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
|
||||||
console.log(`[DEBUG] "${room.name}" (${room.roomId}) is Historical`);
|
|
||||||
newTags[DefaultTagID.Archived].push(room);
|
newTags[DefaultTagID.Archived].push(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,11 +514,7 @@ export class Algorithm extends EventEmitter {
|
||||||
let inTag = false;
|
let inTag = false;
|
||||||
if (tags.length > 0) {
|
if (tags.length > 0) {
|
||||||
for (const tag of tags) {
|
for (const tag of tags) {
|
||||||
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
|
||||||
console.log(`[DEBUG] "${room.name}" (${room.roomId}) is tagged as ${tag}`);
|
|
||||||
if (!isNullOrUndefined(newTags[tag])) {
|
if (!isNullOrUndefined(newTags[tag])) {
|
||||||
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
|
||||||
console.log(`[DEBUG] "${room.name}" (${room.roomId}) is tagged with VALID tag ${tag}`);
|
|
||||||
newTags[tag].push(room);
|
newTags[tag].push(room);
|
||||||
inTag = true;
|
inTag = true;
|
||||||
}
|
}
|
||||||
|
@ -530,11 +522,11 @@ export class Algorithm extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!inTag) {
|
if (!inTag) {
|
||||||
// TODO: Determine if DM and push there instead: https://github.com/vector-im/riot-web/issues/14236
|
if (DMRoomMap.getUserIdForRoomId(room.roomId)) {
|
||||||
newTags[DefaultTagID.Untagged].push(room);
|
newTags[DefaultTagID.DM].push(room);
|
||||||
|
} else {
|
||||||
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
newTags[DefaultTagID.Untagged].push(room);
|
||||||
console.log(`[DEBUG] "${room.name}" (${room.roomId}) is Untagged`);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue