Fix reactions

This commit is contained in:
Nicolas Werner 2020-08-30 19:32:21 +02:00 committed by CH Chethan Reddy
parent f03a48eec5
commit e0981e17a1
3 changed files with 3 additions and 5 deletions

View file

@ -14,7 +14,6 @@ Flow {
property real highlightLight: colors.highlight.hslLightness property real highlightLight: colors.highlight.hslLightness
property string eventId property string eventId
property string roomId
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -35,7 +34,7 @@ Flow {
ToolTip.text: modelData.users ToolTip.text: modelData.users
onClicked: { onClicked: {
console.debug("Picked " + modelData.key + "in response to " + reactionFlow.eventId + " in room " + reactionFlow.roomId + ". selfReactedEvent: " + modelData.selfReactedEvent) console.debug("Picked " + modelData.key + "in response to " + reactionFlow.eventId + ". selfReactedEvent: " + modelData.selfReactedEvent)
TimelineManager.queueReactionMessage(reactionFlow.eventId, modelData.key) TimelineManager.queueReactionMessage(reactionFlow.eventId, modelData.key)
} }
@ -57,7 +56,7 @@ Flow {
Text { Text {
anchors.baseline: reactionCounter.baseline anchors.baseline: reactionCounter.baseline
id: reactionText id: reactionText
text: textMetrics.elidedText + (textMetrics.elidedText == model.key ? "" : "…") text: textMetrics.elidedText + (textMetrics.elidedText == modelData.key ? "" : "…")
font.family: Settings.emojiFont font.family: Settings.emojiFont
color: reaction.hovered ? colors.highlight : colors.text color: reaction.hovered ? colors.highlight : colors.text
maximumLineCount: 1 maximumLineCount: 1

View file

@ -64,7 +64,6 @@ Item {
Reactions { Reactions {
id: reactionRow id: reactionRow
reactions: model.reactions reactions: model.reactions
roomId: model.roomId
eventId: model.id eventId: model.id
} }
} }

View file

@ -104,7 +104,7 @@ Popup {
onClicked: { onClicked: {
console.debug("Picked " + model.unicode + "in response to " + emojiPopup.event_id) console.debug("Picked " + model.unicode + "in response to " + emojiPopup.event_id)
emojiPopup.close() emojiPopup.close()
TimelineManager.queueReactionMessage(emojiPopup.room_id, emojiPopup.event_id, model.unicode) TimelineManager.queueReactionMessage(emojiPopup.event_id, model.unicode)
} }
} }