From fa67c5e248a08b4a72264638250cd9f25ff7882f Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 7 Jun 2021 13:39:58 +0530 Subject: [PATCH] Refactor function - Move related parameters closer together. - Remove unused parameter. Signed-off-by: RMidhunSuresh --- .../web/ui/session/rightpanel/RoomDetailsView.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platform/web/ui/session/rightpanel/RoomDetailsView.js b/src/platform/web/ui/session/rightpanel/RoomDetailsView.js index 3bbeb2da..503ebf49 100644 --- a/src/platform/web/ui/session/rightpanel/RoomDetailsView.js +++ b/src/platform/web/ui/session/rightpanel/RoomDetailsView.js @@ -17,8 +17,8 @@ export class RoomDetailsView extends TemplateView { this._createRoomAliasDisplay(vm), t.div({ className: "RoomDetailsView_rows" }, [ - this._createRightPanelRow(t, vm.i18n`People`, vm => vm.memberCount, { MemberCount: true }), - this._createRightPanelRow(t, vm.i18n`Encryption`, encryptionString, { EncryptionStatus: true }) + this._createRightPanelRow(t, vm.i18n`People`, { MemberCount: true }, vm => vm.memberCount), + this._createRightPanelRow(t, vm.i18n`Encryption`, { EncryptionStatus: true }, encryptionString) ]) ]); } @@ -28,12 +28,11 @@ export class RoomDetailsView extends TemplateView { ""; } - _createRightPanelRow(t, label, value, labelClass, valueClass) { + _createRightPanelRow(t, label, labelClass, value) { const labelClassString = classNames({ RoomDetailsView_label: true, ...labelClass }); - const valueClassString = classNames({ RoomDetailsView_value: true, ...valueClass }); return t.div({ className: "RoomDetailsView_row" }, [ t.div({ className: labelClassString }, [text(label)]), - t.div({ className: valueClassString }, value) + t.div({ className: "RoomDetailsView_value" }, value) ]); }