Inline method

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-15 23:35:44 +05:30
parent c410aed672
commit ec8b6f9dd2

View file

@ -13,7 +13,7 @@ export class MemberListViewModel extends ViewModel {
this.track(powerLevelsObservable.subscribe(() => { /*resort based on new power levels here*/ })); this.track(powerLevelsObservable.subscribe(() => { /*resort based on new power levels here*/ }));
const powerLevels = powerLevelsObservable.get(); const powerLevels = powerLevelsObservable.get();
this.memberTileViewModels = this._mapTileViewModels(this._filterJoinedMembers(list.members)) this.memberTileViewModels = this._mapTileViewModels(list.members.filterValues(member => member.membership === "join"))
.sortValues(createMemberComparator(powerLevels)); .sortValues(createMemberComparator(powerLevels));
this.nameDisambiguator = new Disambiguator(); this.nameDisambiguator = new Disambiguator();
this.mediaRepository = options.mediaRepository; this.mediaRepository = options.mediaRepository;
@ -25,10 +25,6 @@ export class MemberListViewModel extends ViewModel {
get previousSegmentName() { return "details"; } get previousSegmentName() { return "details"; }
_filterJoinedMembers(members) {
return members.filterValues(member => member.membership === "join");
}
_mapTileViewModels(members) { _mapTileViewModels(members) {
const mapper = (member, emitChange) => { const mapper = (member, emitChange) => {
const mediaRepository = this.mediaRepository; const mediaRepository = this.mediaRepository;