From 1c5b953026f8676ed00fe8c4fdc1faeef0512f0d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 27 Apr 2021 16:16:07 +0200 Subject: [PATCH] hide non-joined rooms in left panel for now until we support archiving/forgetting the room --- src/domain/session/leftpanel/LeftPanelViewModel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/domain/session/leftpanel/LeftPanelViewModel.js b/src/domain/session/leftpanel/LeftPanelViewModel.js index a1a577a9..dd9c89ac 100644 --- a/src/domain/session/leftpanel/LeftPanelViewModel.js +++ b/src/domain/session/leftpanel/LeftPanelViewModel.js @@ -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) {