From 82a1b37363a09e33aa2eb80a8b0a9babae673b93 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 May 2021 13:11:38 +0200 Subject: [PATCH] refresh room view model when going from joined -> archived given we have a dedicated class (ArchivedRoom) for it now --- src/domain/session/RoomViewModelObservable.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/domain/session/RoomViewModelObservable.js b/src/domain/session/RoomViewModelObservable.js index 030ba5e4..02b63d3d 100644 --- a/src/domain/session/RoomViewModelObservable.js +++ b/src/domain/session/RoomViewModelObservable.js @@ -61,12 +61,7 @@ export class RoomViewModelObservable extends ObservableValue { } else if (status.joined) { return this._sessionViewModel._createRoomViewModel(this.id); } else if (status.archived) { - if (!this.get() || this.get().kind !== "room") { - return await this._sessionViewModel._createArchivedRoomViewModel(this.id); - } else { - // reuse existing Room - return this.get(); - } + return await this._sessionViewModel._createArchivedRoomViewModel(this.id); } return null; }