2020-07-15 21:04:14 +00:00
|
|
|
import QtQuick 2.3
|
|
|
|
import "../../../../../shared"
|
|
|
|
import "../../../../../imports"
|
|
|
|
|
2020-09-30 20:40:54 +00:00
|
|
|
Loader {
|
2021-02-09 14:53:54 +00:00
|
|
|
active: isMessage
|
2020-09-30 20:40:54 +00:00
|
|
|
height: active ? item.height : 0
|
2020-07-15 21:04:14 +00:00
|
|
|
|
2020-09-30 20:40:54 +00:00
|
|
|
sourceComponent: Component {
|
2020-11-30 17:03:52 +00:00
|
|
|
Item {
|
2020-09-30 20:40:54 +00:00
|
|
|
id: chatImage
|
|
|
|
width: identiconImage.width
|
|
|
|
height: identiconImage.height
|
2020-07-15 21:04:14 +00:00
|
|
|
|
2020-11-30 17:03:52 +00:00
|
|
|
RoundedImage {
|
2020-09-30 20:40:54 +00:00
|
|
|
id: identiconImage
|
|
|
|
width: 36
|
|
|
|
height: 36
|
2020-11-30 17:03:52 +00:00
|
|
|
border.width: 1
|
|
|
|
border.color: Style.current.border
|
|
|
|
source: {
|
|
|
|
if (profileImageSource) {
|
|
|
|
return profileImageSource
|
|
|
|
}
|
2021-01-28 20:13:20 +00:00
|
|
|
identiconImage.showLoadingIndicator = false
|
2020-11-30 17:03:52 +00:00
|
|
|
return !isCurrentUser ? identicon : profileModel.profile.identicon
|
|
|
|
}
|
2020-09-30 20:40:54 +00:00
|
|
|
smooth: false
|
|
|
|
antialiasing: true
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
clickMessage(true)
|
|
|
|
}
|
|
|
|
}
|
2020-07-15 21:04:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|