diff --git a/src/domain/session/RoomViewModelObservable.js b/src/domain/session/RoomViewModelObservable.js index cec2e221..8fd0daf3 100644 --- a/src/domain/session/RoomViewModelObservable.js +++ b/src/domain/session/RoomViewModelObservable.js @@ -64,7 +64,7 @@ export class RoomViewModelObservable extends ObservableValue { if (status & RoomStatus.BeingCreated) { const {session} = this._sessionViewModel._client; const roomBeingCreated = session.roomsBeingCreated.get(this.id); - this._sessionViewModel.navigation.push("room", roomBeingCreated.roomId); + this._sessionViewModel.notifyRoomReplaced(roomBeingCreated.id, roomBeingCreated.roomId); } else { throw new Error("Don't know how to replace a room with this status: " + (status ^ RoomStatus.Replaced)); } diff --git a/src/domain/session/SessionViewModel.js b/src/domain/session/SessionViewModel.js index 5a818c4d..24276f42 100644 --- a/src/domain/session/SessionViewModel.js +++ b/src/domain/session/SessionViewModel.js @@ -298,4 +298,7 @@ export class SessionViewModel extends ViewModel { this.emitChange("rightPanelViewModel"); } + notifyRoomReplaced(oldId, newId) { + this.navigation.push("room", newId); + } }