chore: remove duplication

This commit is contained in:
Patryk Osmaczko 2022-06-10 10:05:32 +02:00 committed by osmaczko
parent c9fe428940
commit 0e3c20fb22
1 changed files with 6 additions and 30 deletions

View File

@ -349,11 +349,11 @@ Item {
}
}
StatusSmartIdenticon {
UserImage {
id: chatImage
property int imageHeight: 36
property int imageWidth: 36
active: isMessage && headerRepeatCondition
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
@ -361,35 +361,11 @@ Item {
pinnedRectangleLoader.active ? pinnedRectangleLoader.bottom : parent.top
anchors.topMargin: chatReply.active || pinnedRectangleLoader.active ? 4 : Style.current.smallPadding
active: isMessage && headerRepeatCondition
width: active? imageWidth : 0
height: active? imageHeight : 0
image: root.senderIcon
pubkey: senderId
name: senderDisplayName
image {
width: chatImage.imageWidth
height: chatImage.imageHeight
source: root.senderIcon
}
icon {
width: chatImage.imageWidth
height: chatImage.imageHeight
color: Utils.colorForPubkey(senderId)
charactersLen: 2
}
ringSettings {
ringSpecModel: Utils.getColorHashAsJson(senderId)
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
root.clickMessage(true, false, false, null, false, false, false, false, "")
}
}
onClicked: root.clickMessage(true, false, false, null, false, false, false, false, "")
}
UsernameLabel {