small fixes

This commit is contained in:
Bruno Windels 2022-03-25 14:43:22 +01:00
parent eaf92b382b
commit 4bf171def9
4 changed files with 4 additions and 4 deletions

View File

@ -395,4 +395,4 @@ document.getElementById("showAll").addEventListener("click", () => {
for (const node of document.querySelectorAll(".hidden")) {
node.classList.remove("hidden");
}
});
});

View File

@ -191,7 +191,7 @@ export class SessionViewModel extends ViewModel {
async _createArchivedRoomViewModel(roomId) {
const room = await this._client.session.loadArchivedRoom(roomId);
if (room) {
const roomVM = new RoomViewModel(this.childOptions({room}));
const roomVM = new RoomViewModel(this.childOptions({room, session: this._client.session}));
roomVM.load();
return roomVM;
}

View File

@ -62,7 +62,7 @@ export class PickMapObservableValue<K, V> extends BaseObservableValue<V | undefi
this.key = undefined;
// try to see if there is another key that fullfills pickKey
for (const [key] of this.map) {
this.updateKey(key) || changed;
this.updateKey(key);
}
this.emit(this.get());
}

View File

@ -53,6 +53,6 @@ export function viewClassForEntry(entry: SimpleTile): TileViewConstructor | unde
case "redacted":
return RedactedView;
case "call":
return CallTileView;
return CallTileView as any as TileViewConstructor;
}
}