fix: missing username

This commit is contained in:
Richard Ramos 2020-12-11 14:15:40 -04:00 committed by Iuri Matias
parent 334d538700
commit 5ad54b057b
4 changed files with 9 additions and 18 deletions

View File

@ -75,7 +75,7 @@ Loader {
anchors.topMargin: repliedMessageType == Constants.imageType ? 15 : 8
anchors.left: lblReplyMessage.left
anchors.right: lblReplyMessage.right
anchors.rightMargin: chatTextItem.chatHorizontalPadding
anchors.rightMargin: root.chatHorizontalPadding
color: root.elementsColor
}
}

View File

@ -36,9 +36,6 @@ Item {
// anchors.top: dateGroupLbl.visible ? dateGroupLbl.bottom : parent.top
anchors.top: parent.top
anchors.left: chatImage.right
userName: messageItem.userName
localName: messageItem.localName
alias: messageItem.alias
}
ChatReply {

View File

@ -36,9 +36,6 @@ Item {
anchors.top: dateGroupLbl.visible ? dateGroupLbl.bottom : parent.top
anchors.topMargin: 0
anchors.left: chatImage.right
userName: messageItem.userName
localName: messageItem.localName
alias: messageItem.alias
}
Rectangle {

View File

@ -6,9 +6,6 @@ Item {
id: root
height: childrenRect.height
width: chatName.width + (ensOrAlias.visible ? ensOrAlias.width + ensOrAlias.anchors.leftMargin : 0)
property string userName: ""
property string localName: ""
property string alias: ""
property alias label: chatName
visible: isMessage && authorCurrentMsg != authorPrevMsg
@ -19,16 +16,16 @@ Item {
return qsTr("You")
}
if (root.localName !== "") {
return root.localName
if (localName !== "") {
return localName
}
if (root.userName !== "") {
return Utils.removeStatusEns(root.userName)
if (userName !== "") {
return Utils.removeStatusEns(userName)
}
return Utils.removeStatusEns(root.alias)
return Utils.removeStatusEns(alias)
}
color: text.startsWith("@") || isCurrentUser || root.localName !== "" ? Style.current.blue : Style.current.secondaryText
color: text.startsWith("@") || isCurrentUser || localName !== "" ? Style.current.blue : Style.current.secondaryText
font.weight: Font.Medium
font.pixelSize: Style.current.secondaryTextFontSize
readOnly: true
@ -53,8 +50,8 @@ Item {
StyledText {
id: ensOrAlias
visible: root.localName !== "" && root.userName.startsWith("@")
text: root.userName
visible: localName !== "" && userName.startsWith("@")
text: userName
color: Style.current.secondaryText
font.pixelSize: chatName.font.pixelSize
anchors.left: chatName.right