From 396ec4dfd96ff545d684b2cbdbe1cf3c28ad4ddc Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 27 Apr 2021 15:33:12 +0200 Subject: [PATCH] also in grid remove room id from nav path when refreshing room vm fails --- src/domain/session/RoomGridViewModel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/domain/session/RoomGridViewModel.js b/src/domain/session/RoomGridViewModel.js index 05c55041..ce31e22c 100644 --- a/src/domain/session/RoomGridViewModel.js +++ b/src/domain/session/RoomGridViewModel.js @@ -15,6 +15,7 @@ limitations under the License. */ import {ViewModel} from "../ViewModel.js"; +import {removeRoomFromPath} from "../navigation/index.js"; function dedupeSparse(roomIds) { return roomIds.map((id, idx) => { @@ -77,6 +78,9 @@ export class RoomGridViewModel extends ViewModel { if (this.focusIndex === index) { roomVM.focus(); } + } else { + // close room id + this.navigation.applyPath(removeRoomFromPath(this.navigation.path, roomId)); } this.emitChange(); }