Hide the archived section (#12286)
* Hide the archived section * Only add archived section if necessary * Update e2e tests
This commit is contained in:
@@ -87,7 +87,10 @@ export const TAG_ORDER: TagID[] = [
|
||||
DefaultTagID.LowPriority,
|
||||
DefaultTagID.ServerNotice,
|
||||
DefaultTagID.Suggested,
|
||||
DefaultTagID.Archived,
|
||||
// DefaultTagID.Archived isn't here any more: we don't show it at all.
|
||||
// The section still exists in the code as a place for rooms that we know
|
||||
// about but aren't joined. At some point it could be removed entirely
|
||||
// but we'd have to make sure that rooms you weren't in were hidden.
|
||||
];
|
||||
const ALWAYS_VISIBLE_TAGS: TagID[] = [DefaultTagID.DM, DefaultTagID.Untagged];
|
||||
|
||||
|
||||
@@ -498,6 +498,8 @@ export class Algorithm extends EventEmitter {
|
||||
newTags[DefaultTagID.Invite].push(room);
|
||||
}
|
||||
for (const room of memberships[EffectiveMembership.Leave]) {
|
||||
// We may not have had an archived section previously, so make sure its there.
|
||||
if (newTags[DefaultTagID.Archived] === undefined) newTags[DefaultTagID.Archived] = [];
|
||||
newTags[DefaultTagID.Archived].push(room);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user