timeline: Load avatars asynchronously
Speeds up scrolling through the timeline.
This commit is contained in:
@@ -28,6 +28,7 @@ Flow {
|
|||||||
name: displayName
|
name: displayName
|
||||||
source: avatarUrl
|
source: avatarUrl
|
||||||
color: memberColor
|
color: memberColor
|
||||||
|
asynchronous: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ TimelineDelegate {
|
|||||||
name: root.author.displayName
|
name: root.author.displayName
|
||||||
source: root.author.avatarUrl
|
source: root.author.avatarUrl
|
||||||
color: root.author.color
|
color: root.author.color
|
||||||
|
asynchronous: true
|
||||||
}
|
}
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ TimelineDelegate {
|
|||||||
name: root.author.displayName
|
name: root.author.displayName
|
||||||
source: root.author.avatarUrl
|
source: root.author.avatarUrl
|
||||||
color: root.author.color
|
color: root.author.color
|
||||||
|
asynchronous: true
|
||||||
QQC2.ToolTip.text: root.author.htmlSafeDisambiguatedName
|
QQC2.ToolTip.text: root.author.htmlSafeDisambiguatedName
|
||||||
|
|
||||||
onClicked: RoomManager.resolveResource(root.author.uri)
|
onClicked: RoomManager.resolveResource(root.author.uri)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ RowLayout {
|
|||||||
source: root.author.avatarUrl
|
source: root.author.avatarUrl
|
||||||
name: root.author.displayName
|
name: root.author.displayName
|
||||||
color: root.author.color
|
color: root.author.color
|
||||||
|
asynchronous: true
|
||||||
}
|
}
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
id: replyName
|
id: replyName
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ RowLayout {
|
|||||||
source: root.author?.avatarUrl ?? ""
|
source: root.author?.avatarUrl ?? ""
|
||||||
name: root.author?.displayName ?? ""
|
name: root.author?.displayName ?? ""
|
||||||
color: root.author?.color ?? Kirigami.Theme.highlightColor
|
color: root.author?.color ?? Kirigami.Theme.highlightColor
|
||||||
|
asynchronous: true
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ TimelineDelegate {
|
|||||||
name: parent.modelData.displayName
|
name: parent.modelData.displayName
|
||||||
source: parent.modelData.avatarUrl
|
source: parent.modelData.avatarUrl
|
||||||
color: parent.modelData.color
|
color: parent.modelData.color
|
||||||
|
asynchronous: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ TimelineDelegate {
|
|||||||
|
|
||||||
name: root.room ? root.room.displayName : ""
|
name: root.room ? root.room.displayName : ""
|
||||||
source: root.room ? root.room.avatarMediaUrl : ""
|
source: root.room ? root.room.avatarMediaUrl : ""
|
||||||
|
asynchronous: true
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: room.usesEncryption
|
visible: room.usesEncryption
|
||||||
|
|||||||
Reference in New Issue
Block a user