From 5bc480c7068286131bd2aba406324528fe335ab3 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 29 Jul 2026 09:43:57 +0200 Subject: [PATCH] gui-kf5: fix reaction badge not updating via reactive property In Qt5 Repeater delegates, 'property var block: model' doesn't propagate dataChanged updates for individual roles. Add a reactive 'blockReaction' string property bound to model.reaction directly, which updates when the model emits dataChanged. --- gui/main-kf5.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index d6584ca..7e222b3 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -1148,6 +1148,7 @@ ApplicationWindow { delegate: Loader { width: paneColumn.width property var block: model + property string blockReaction: model.reaction || "" sourceComponent: { switch (blockType) { case "user": return userDelegate @@ -1540,20 +1541,20 @@ ApplicationWindow { anchors.right: parent.right anchors.margins: 4 z: 10 - text: block.reaction || "" + text: blockReaction font.pixelSize: 18 - visible: block.reaction !== "" + visible: blockReaction !== "" } // Reaction buttons (hover only, hidden when already reacted) Row { anchors.bottom: parent.bottom anchors.right: parent.right - anchors.rightMargin: block.reaction !== "" ? 36 : 4 + anchors.rightMargin: blockReaction !== "" ? 36 : 4 anchors.margins: 4 z: 10 spacing: 2 - opacity: (assistantHover.hovered && block.reaction === "") ? 0.9 : 0 + opacity: (assistantHover.hovered && blockReaction === "") ? 0.9 : 0 Behavior on opacity { NumberAnimation { duration: 150 } } Repeater {