refactor(@desktop/profile): don't display footer or chat settings in profile popup for own profile

Closes #3462.
This commit is contained in:
Michael Bradley, Jr 2021-09-24 15:21:25 -05:00 committed by Iuri Matias
parent 7ac4eba9e2
commit b94b932572
1 changed files with 5 additions and 3 deletions

View File

@ -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
}