forked from mystiq/hydrogen-web
adjust ctor of SessionViewModel to accept sessionContainer now
This commit is contained in:
parent
e37101210c
commit
449262e3c1
1 changed files with 3 additions and 3 deletions
|
@ -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 a new issue