mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-30 22:21:38 +01:00
Release memberlist after panel is closed
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
5a54be2e2e
commit
5873ab63ba
@ -6,9 +6,11 @@ import {Disambiguator} from "./disambiguator.js";
|
|||||||
export class MemberListViewModel extends ViewModel {
|
export class MemberListViewModel extends ViewModel {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
super(options);
|
super(options);
|
||||||
|
const list = options.members;
|
||||||
|
this.track(() => list.release());
|
||||||
const powerLevels = options.powerLevelsObservable.get();
|
const powerLevels = options.powerLevelsObservable.get();
|
||||||
// We should subscribe to the observable here so that we can resort when pl changes
|
// 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));
|
.sortValues(createMemberComparator(powerLevels));
|
||||||
this.nameDisambiguator = new Disambiguator();
|
this.nameDisambiguator = new Disambiguator();
|
||||||
this.mediaRepository = options.mediaRepository;
|
this.mediaRepository = options.mediaRepository;
|
||||||
|
@ -12,10 +12,10 @@ export class RightPanelViewModel extends ViewModel {
|
|||||||
get activeViewModel() { return this._activeViewModel; }
|
get activeViewModel() { return this._activeViewModel; }
|
||||||
|
|
||||||
async _getMemberArguments() {
|
async _getMemberArguments() {
|
||||||
const list = await this._room.loadMemberList();
|
const members = await this._room.loadMemberList();
|
||||||
const room = this._room;
|
const room = this._room;
|
||||||
const powerLevelsObservable = await this._room.observePowerLevels();
|
const powerLevelsObservable = await this._room.observePowerLevels();
|
||||||
return {members: list.members, powerLevelsObservable, mediaRepository: room.mediaRepository};
|
return {members, powerLevelsObservable, mediaRepository: room.mediaRepository};
|
||||||
}
|
}
|
||||||
|
|
||||||
_setupNavigation() {
|
_setupNavigation() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user