2020-09-22 14:45:09 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import "../../imports"
|
|
|
|
import "../../shared"
|
|
|
|
import "../../shared/status"
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property string chatName
|
|
|
|
property int chatType
|
|
|
|
property string identicon
|
|
|
|
|
|
|
|
width: 40
|
|
|
|
height: 40
|
|
|
|
|
|
|
|
Loader {
|
2020-12-04 10:28:55 +00:00
|
|
|
sourceComponent: root.chatType == Constants.chatTypeOneToOne || !!root.identicon ? imageIdenticon : letterIdenticon
|
2020-09-22 14:45:09 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: letterIdenticon
|
|
|
|
|
|
|
|
StatusLetterIdenticon {
|
|
|
|
chatName: root.chatName
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: imageIdenticon
|
|
|
|
|
|
|
|
StatusImageIdenticon {
|
|
|
|
source: root.identicon
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|