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(); }