From c2b9c3f726e82f21ff8dbea69f86ddd3020750d3 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 20 Jul 2021 21:36:07 +0530 Subject: [PATCH] Add isEncrypted to vm Signed-off-by: RMidhunSuresh --- src/domain/session/rightpanel/MemberDetailsViewModel.js | 5 +++++ src/domain/session/rightpanel/RightPanelViewModel.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/domain/session/rightpanel/MemberDetailsViewModel.js b/src/domain/session/rightpanel/MemberDetailsViewModel.js index 61313c04..0c526130 100644 --- a/src/domain/session/rightpanel/MemberDetailsViewModel.js +++ b/src/domain/session/rightpanel/MemberDetailsViewModel.js @@ -23,6 +23,7 @@ export class MemberDetailsViewModel extends ViewModel { this._observableMember = options.observableMember; this._mediaRepository = options.mediaRepository; this._member = this._observableMember.get(); + this._isEncrypted = options.isEncrypted; this.track(this._observableMember.subscribe( () => this._onMemberChange())); } @@ -55,4 +56,8 @@ export class MemberDetailsViewModel extends ViewModel { get avatarTitle() { return this.name; } + + get isEncrypted() { + return this._isEncrypted; + } } diff --git a/src/domain/session/rightpanel/RightPanelViewModel.js b/src/domain/session/rightpanel/RightPanelViewModel.js index 87809eb8..1e058674 100644 --- a/src/domain/session/rightpanel/RightPanelViewModel.js +++ b/src/domain/session/rightpanel/RightPanelViewModel.js @@ -23,7 +23,8 @@ export class RightPanelViewModel extends ViewModel { const segment = this.navigation.path.get("member"); const userId = segment.value; 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() {