Reaction Model
Create a reaction model that provides all the required data for `ReactionDelegate` so that none need to be calculated in QML. This also cleans up the API for `ReactionDelegate`
This commit is contained in:
@@ -334,7 +334,10 @@ ColumnLayout {
|
||||
Layout.leftMargin: showUserMessageOnRight ? 0 : bubble.x + bubble.anchors.leftMargin
|
||||
Layout.rightMargin: showUserMessageOnRight ? Kirigami.Units.largeSpacing : 0
|
||||
|
||||
visible: delegateType !== MessageEventModel.State && delegateType !== MessageEventModel.Notice && reaction != undefined && reaction.length > 0
|
||||
visible: showReactions
|
||||
model: reaction
|
||||
|
||||
onReactionClicked: (reaction) => currentRoom.toggleReaction(eventId, reaction)
|
||||
}
|
||||
AvatarFlow {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
Reference in New Issue
Block a user