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.topMargin: repliedMessageType == Constants.imageType ? 15 : 8
anchors.left: lblReplyMessage.left anchors.left: lblReplyMessage.left
anchors.right: lblReplyMessage.right anchors.right: lblReplyMessage.right
anchors.rightMargin: chatTextItem.chatHorizontalPadding anchors.rightMargin: root.chatHorizontalPadding
color: root.elementsColor color: root.elementsColor
} }
} }

View File

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

View File

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

View File

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