refresh room view model when going from joined -> archived

given we have a dedicated class (ArchivedRoom) for it now
This commit is contained in:
Bruno Windels 2021-05-11 13:11:38 +02:00
parent e3c1644d09
commit 82a1b37363

View file

@ -61,12 +61,7 @@ export class RoomViewModelObservable extends ObservableValue {
} else if (status.joined) { } else if (status.joined) {
return this._sessionViewModel._createRoomViewModel(this.id); return this._sessionViewModel._createRoomViewModel(this.id);
} else if (status.archived) { } else if (status.archived) {
if (!this.get() || this.get().kind !== "room") { return await this._sessionViewModel._createArchivedRoomViewModel(this.id);
return await this._sessionViewModel._createArchivedRoomViewModel(this.id);
} else {
// reuse existing Room
return this.get();
}
} }
return null; return null;
} }