mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
refactor(@desktop/profile): don't display footer or chat settings in profile popup for own profile
Closes #3462.
This commit is contained in:
parent
7ac4eba9e2
commit
b94b932572
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user