Add isEncrypted to vm

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-20 21:36:07 +05:30
parent 7ef7c419e3
commit c2b9c3f726
2 changed files with 7 additions and 1 deletions

View file

@ -23,6 +23,7 @@ export class MemberDetailsViewModel extends ViewModel {
this._observableMember = options.observableMember; this._observableMember = options.observableMember;
this._mediaRepository = options.mediaRepository; this._mediaRepository = options.mediaRepository;
this._member = this._observableMember.get(); this._member = this._observableMember.get();
this._isEncrypted = options.isEncrypted;
this.track(this._observableMember.subscribe( () => this._onMemberChange())); this.track(this._observableMember.subscribe( () => this._onMemberChange()));
} }
@ -55,4 +56,8 @@ export class MemberDetailsViewModel extends ViewModel {
get avatarTitle() { get avatarTitle() {
return this.name; return this.name;
} }
get isEncrypted() {
return this._isEncrypted;
}
} }

View file

@ -23,7 +23,8 @@ export class RightPanelViewModel extends ViewModel {
const segment = this.navigation.path.get("member"); const segment = this.navigation.path.get("member");
const userId = segment.value; const userId = segment.value;
const observableMember = await this._room.observeMember(userId); const observableMember = await this._room.observeMember(userId);
return {observableMember, mediaRepository: this._room.mediaRepository}; const isEncrypted = this._room.isEncrypted;
return {observableMember, isEncrypted, mediaRepository: this._room.mediaRepository};
} }
_setupNavigation() { _setupNavigation() {