diff options
author | Joseph Donofry <joedonofry@gmail.com> | 2020-06-09 21:28:15 -0400 |
---|---|---|
committer | Joseph Donofry <joedonofry@gmail.com> | 2020-06-09 21:28:15 -0400 |
commit | 0078c72a374940bc815102315043106350da0911 (patch) | |
tree | 9284612527426adf9c466d85b246f51c0865e385 /resources/qml/Reactions.qml | |
parent | Remove duplicate search icons (diff) | |
download | nheko-0078c72a374940bc815102315043106350da0911.tar.xz |
Remove signals in favor of direct function calls
Diffstat (limited to 'resources/qml/Reactions.qml')
-rw-r--r-- | resources/qml/Reactions.qml | 6 |
1 files changed, 2 insertions, 4 deletions
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 |