diff --git a/src/domain/session/rightpanel/MemberListViewModel.js b/src/domain/session/rightpanel/MemberListViewModel.js index ce0fff40..a6f58f5d 100644 --- a/src/domain/session/rightpanel/MemberListViewModel.js +++ b/src/domain/session/rightpanel/MemberListViewModel.js @@ -7,7 +7,6 @@ export class MemberListViewModel extends ViewModel { constructor(options) { super(options); const list = options.members; - this.track(() => list.release()); const powerLevelsObservable = options.powerLevelsObservable; this.track(powerLevelsObservable.subscribe(() => { /*resort based on new power levels here*/ })); diff --git a/src/domain/session/rightpanel/RightPanelViewModel.js b/src/domain/session/rightpanel/RightPanelViewModel.js index 5564fd8d..86225ca9 100644 --- a/src/domain/session/rightpanel/RightPanelViewModel.js +++ b/src/domain/session/rightpanel/RightPanelViewModel.js @@ -7,16 +7,20 @@ export class RightPanelViewModel extends ViewModel { constructor(options) { super(options); this._room = options.room; + this._members = null; this._setupNavigation(); } get activeViewModel() { return this._activeViewModel; } async _getMemberListArguments() { - const members = await this._room.loadMemberList(); + if (!this._members) { + this._members = await this._room.loadMemberList(); + this.track(() => this._members.release()); + } const room = this._room; const powerLevelsObservable = await this._room.observePowerLevels(); - return {members, powerLevelsObservable, mediaRepository: room.mediaRepository}; + return {members: this._members, powerLevelsObservable, mediaRepository: room.mediaRepository}; } async _getMemberDetailsArguments() {