From 0078c72a374940bc815102315043106350da0911 Mon Sep 17 00:00:00 2001 From: Joseph Donofry Date: Tue, 9 Jun 2020 21:28:15 -0400 Subject: Remove signals in favor of direct function calls --- resources/qml/Reactions.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'resources/qml/Reactions.qml') diff --git a/resources/qml/Reactions.qml b/resources/qml/Reactions.qml index ea2659b7..c06dc826 100644 --- a/resources/qml/Reactions.qml +++ b/resources/qml/Reactions.qml @@ -5,8 +5,6 @@ import QtQuick.Controls 2.2 // adding new reactions via the emoji picker Flow { id: reactionFlow - // Signal for when a reaction is picked / unpicked - signal picked(string room_id, string event_id, string key, string selfReactedEvent) // highlight colors for selfReactedEvent background property real highlightHue: colors.highlight.hslHue @@ -36,7 +34,7 @@ Flow { onClicked: { console.debug("Picked " + model.key + "in response to " + reactionFlow.eventId + " in room " + reactionFlow.roomId + ". selfReactedEvent: " + model.selfReactedEvent) - reactionFlow.picked(reactionFlow.roomId, reactionFlow.eventId, model.key, model.selfReactedEvent) + timelineManager.reactToMessage(reactionFlow.roomId, reactionFlow.eventId, model.key, model.selfReactedEvent) } @@ -57,7 +55,7 @@ Flow { Text { anchors.baseline: reactionCounter.baseline id: reactionText - text: textMetrics.elidedText + (textMetrics.elidedText == textMetrics.text ? "" : "…") + text: textMetrics.elidedText + (textMetrics.elidedText == model.key ? "" : "…") font.family: settings.emojiFont color: reaction.hovered ? colors.highlight : colors.text maximumLineCount: 1 -- cgit 1.5.1