diff --git a/src/domain/session/rightpanel/MemberListViewModel.js b/src/domain/session/rightpanel/MemberListViewModel.js index 3b6a2c98..9b14e2af 100644 --- a/src/domain/session/rightpanel/MemberListViewModel.js +++ b/src/domain/session/rightpanel/MemberListViewModel.js @@ -6,9 +6,11 @@ import {Disambiguator} from "./disambiguator.js"; export class MemberListViewModel extends ViewModel { constructor(options) { super(options); + const list = options.members; + this.track(() => list.release()); const powerLevels = options.powerLevelsObservable.get(); // We should subscribe to the observable here so that we can resort when pl changes - this.memberTileViewModels = this._mapTileViewModels(this._filterJoinedMembers(options.members)) + this.memberTileViewModels = this._mapTileViewModels(this._filterJoinedMembers(list.members)) .sortValues(createMemberComparator(powerLevels)); this.nameDisambiguator = new Disambiguator(); this.mediaRepository = options.mediaRepository; diff --git a/src/domain/session/rightpanel/RightPanelViewModel.js b/src/domain/session/rightpanel/RightPanelViewModel.js index 3e866208..c56080a8 100644 --- a/src/domain/session/rightpanel/RightPanelViewModel.js +++ b/src/domain/session/rightpanel/RightPanelViewModel.js @@ -12,10 +12,10 @@ export class RightPanelViewModel extends ViewModel { get activeViewModel() { return this._activeViewModel; } async _getMemberArguments() { - const list = await this._room.loadMemberList(); + const members = await this._room.loadMemberList(); const room = this._room; const powerLevelsObservable = await this._room.observePowerLevels(); - return {members: list.members, powerLevelsObservable, mediaRepository: room.mediaRepository}; + return {members, powerLevelsObservable, mediaRepository: room.mediaRepository}; } _setupNavigation() {