mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
adjust ctor of SessionViewModel to accept sessionContainer now
This commit is contained in:
parent
e37101210c
commit
449262e3c1
@ -4,10 +4,10 @@ import {RoomViewModel} from "./room/RoomViewModel.js";
|
|||||||
import {SyncStatusViewModel} from "./SyncStatusViewModel.js";
|
import {SyncStatusViewModel} from "./SyncStatusViewModel.js";
|
||||||
|
|
||||||
export class SessionViewModel extends EventEmitter {
|
export class SessionViewModel extends EventEmitter {
|
||||||
constructor({session, sync}) {
|
constructor(sessionContainer) {
|
||||||
super();
|
super();
|
||||||
this._session = session;
|
this._session = sessionContainer.session;
|
||||||
this._syncStatusViewModel = new SyncStatusViewModel(sync);
|
this._syncStatusViewModel = new SyncStatusViewModel(sessionContainer.sync);
|
||||||
this._currentRoomViewModel = null;
|
this._currentRoomViewModel = null;
|
||||||
const roomTileVMs = this._session.rooms.mapValues((room, emitUpdate) => {
|
const roomTileVMs = this._session.rooms.mapValues((room, emitUpdate) => {
|
||||||
return new RoomTileViewModel({
|
return new RoomTileViewModel({
|
||||||
|
Loading…
Reference in New Issue
Block a user