summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-03-25 22:31:18 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-03-25 23:42:01 +0100
commitef31f67c326ebf8d467227b8c92a079add412cac (patch)
tree131fc88a0f0580550624bb87d7018000f5114b6a /resources
parentCleanup CI config and add sections (diff)
downloadnheko-ef31f67c326ebf8d467227b8c92a079add412cac.tar.xz
Delay some delegate removals to reduce CPU spent on recalculating sizes
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/Completer.qml2
-rw-r--r--resources/qml/MessageView.qml1
2 files changed, 3 insertions, 0 deletions
diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml
index bb752597..9700f843 100644
--- a/resources/qml/Completer.qml
+++ b/resources/qml/Completer.qml
@@ -125,6 +125,8 @@ Control {
         delegate: Rectangle {
             property variant modelData: model
 
+            ListView.delayRemove: true
+
             color: model.index == popup.currentIndex ? Nheko.colors.highlight : Nheko.colors.base
             height: chooser.child.implicitHeight + 2 * popup.rowMargin
             implicitWidth: fullWidth ? ListView.view.width : chooser.child.implicitWidth + 4
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index 83cbb781..c75710cf 100644
--- a/resources/qml/MessageView.qml
+++ b/resources/qml/MessageView.qml
@@ -449,6 +449,7 @@ Item {
             anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
             width: chat.delegateMaxWidth
             height: section.active ? section.height + timelinerow.height : timelinerow.height
+            ListView.delayRemove: true
 
             Loader {
                 id: section