hide non-joined rooms in left panel for now

until we support archiving/forgetting the room
This commit is contained in:
Bruno Windels 2021-04-27 16:16:07 +02:00
parent 025320b83e
commit 1c5b953026

View file

@ -35,8 +35,9 @@ export class LeftPanelViewModel extends ViewModel {
}
_mapTileViewModels(rooms, invites) {
const joinedRooms = rooms.filterValues(room => room.membership === "join");
// join is not commutative, invites will take precedence over rooms
return invites.join(rooms).mapValues((roomOrInvite, emitChange) => {
return invites.join(joinedRooms).mapValues((roomOrInvite, emitChange) => {
const isOpen = this.navigation.path.get("room")?.value === roomOrInvite.id;
let vm;
if (roomOrInvite.isInvite) {