From b94b932572d52005ac4b24cbf8e54d6db0b7356d Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Fri, 24 Sep 2021 15:21:25 -0500 Subject: [PATCH] refactor(@desktop/profile): don't display footer or chat settings in profile popup for own profile Closes #3462. --- ui/app/AppLayouts/Chat/components/ProfilePopup.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/app/AppLayouts/Chat/components/ProfilePopup.qml b/ui/app/AppLayouts/Chat/components/ProfilePopup.qml index e579f45ccd..ecba04cfa7 100644 --- a/ui/app/AppLayouts/Chat/components/ProfilePopup.qml +++ b/ui/app/AppLayouts/Chat/components/ProfilePopup.qml @@ -28,7 +28,6 @@ StatusModal { readonly property int innerMargin: 20 property bool isEnsVerified: false - property bool noFooter: false property bool isBlocked: false property bool isCurrentUser: false @@ -40,7 +39,7 @@ StatusModal { signal contactBlocked(publicKey: string) signal contactAdded(publicKey: string) - function openPopup(showFooter, userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam) { + function openPopup(_showFooter, userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam) { userName = userNameParam || "" nickname = nicknameParam || "" fromAuthor = fromAuthorParam || "" @@ -50,7 +49,7 @@ StatusModal { isBlocked = profileModel.contacts.isContactBlocked(this.fromAuthor); alias = chatsModel.alias(this.fromAuthor) || "" isCurrentUser = profileModel.profile.pubKey === this.fromAuthor - noFooter = !showFooter; + showFooter = _showFooter; popup.open() } @@ -159,11 +158,13 @@ StatusModal { } StatusModalDivider { + visible: !isCurrentUser topPadding: 8 bottomPadding: 12 } StatusDescriptionListItem { + visible: !isCurrentUser title: qsTr("Chat settings") subTitle: qsTr("Nickname") value: nickname ? nickname : qsTr("None") @@ -175,6 +176,7 @@ StatusModal { } Item { + visible: !isCurrentUser width: parent.width height: 16 }