From 3eaef148fe69e8f9172d2c72dc0ed41b06f32302 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 25 Dec 2024 21:39:58 +0100 Subject: [PATCH] timeline: Load avatars asynchronously Speeds up scrolling through the timeline. --- src/timeline/AvatarFlow.qml | 1 + src/timeline/HiddenDelegate.qml | 1 + src/timeline/MessageDelegate.qml | 1 + src/timeline/ReplyAuthorComponent.qml | 1 + src/timeline/StateComponent.qml | 1 + src/timeline/StateDelegate.qml | 1 + src/timeline/TimelineEndDelegate.qml | 1 + 7 files changed, 7 insertions(+) diff --git a/src/timeline/AvatarFlow.qml b/src/timeline/AvatarFlow.qml index 212c2f58b..6ef3cc370 100644 --- a/src/timeline/AvatarFlow.qml +++ b/src/timeline/AvatarFlow.qml @@ -28,6 +28,7 @@ Flow { name: displayName source: avatarUrl color: memberColor + asynchronous: true } } QQC2.Label { diff --git a/src/timeline/HiddenDelegate.qml b/src/timeline/HiddenDelegate.qml index c0438f478..11b4dd9be 100644 --- a/src/timeline/HiddenDelegate.qml +++ b/src/timeline/HiddenDelegate.qml @@ -49,6 +49,7 @@ TimelineDelegate { name: root.author.displayName source: root.author.avatarUrl color: root.author.color + asynchronous: true } QQC2.Label { Layout.fillWidth: true diff --git a/src/timeline/MessageDelegate.qml b/src/timeline/MessageDelegate.qml index 50e682893..0f5adb443 100644 --- a/src/timeline/MessageDelegate.qml +++ b/src/timeline/MessageDelegate.qml @@ -250,6 +250,7 @@ TimelineDelegate { name: root.author.displayName source: root.author.avatarUrl color: root.author.color + asynchronous: true QQC2.ToolTip.text: root.author.htmlSafeDisambiguatedName onClicked: RoomManager.resolveResource(root.author.uri) diff --git a/src/timeline/ReplyAuthorComponent.qml b/src/timeline/ReplyAuthorComponent.qml index 56fd77452..bf7d9a048 100644 --- a/src/timeline/ReplyAuthorComponent.qml +++ b/src/timeline/ReplyAuthorComponent.qml @@ -40,6 +40,7 @@ RowLayout { source: root.author.avatarUrl name: root.author.displayName color: root.author.color + asynchronous: true } QQC2.Label { id: replyName diff --git a/src/timeline/StateComponent.qml b/src/timeline/StateComponent.qml index 2d3f8a4eb..d9848a2e8 100644 --- a/src/timeline/StateComponent.qml +++ b/src/timeline/StateComponent.qml @@ -49,6 +49,7 @@ RowLayout { source: root.author?.avatarUrl ?? "" name: root.author?.displayName ?? "" color: root.author?.color ?? Kirigami.Theme.highlightColor + asynchronous: true MouseArea { anchors.fill: parent diff --git a/src/timeline/StateDelegate.qml b/src/timeline/StateDelegate.qml index bf669f75d..aa18f0bfb 100644 --- a/src/timeline/StateDelegate.qml +++ b/src/timeline/StateDelegate.qml @@ -105,6 +105,7 @@ TimelineDelegate { name: parent.modelData.displayName source: parent.modelData.avatarUrl color: parent.modelData.color + asynchronous: true } } } diff --git a/src/timeline/TimelineEndDelegate.qml b/src/timeline/TimelineEndDelegate.qml index 8c74e6f77..c5d836a29 100644 --- a/src/timeline/TimelineEndDelegate.qml +++ b/src/timeline/TimelineEndDelegate.qml @@ -36,6 +36,7 @@ TimelineDelegate { name: root.room ? root.room.displayName : "" source: root.room ? root.room.avatarMediaUrl : "" + asynchronous: true Rectangle { visible: room.usesEncryption