status-desktop/ui/imports/shared/controls/chat/MessageReactionsRow.qml
Godfrain Jacques 8872877524
fix(@desktop/chat): Message reactions popup shouldn't revoke reactions (#13003)
fixes #10703

- Adding a reaction by going in add reaction and clicking R1 should have no effect (Currently the reaction R1 is removed which is not expected)
- Clicking on the R1 directly on the message should remove the reaction (I checked and this already works)
- Add a visual indicator in the add reaction popup on which emoji is already selected
2023-12-18 14:34:10 -08:00

32 lines
683 B
QML

import QtQuick 2.15
import utils 1.0
import shared 1.0
Row {
id: root
property var reactionsModel: []
signal toggleReaction(int emojiId)
spacing: Style.current.halfPadding
leftPadding: Style.current.halfPadding
rightPadding: Style.current.halfPadding
Repeater {
model: root.reactionsModel
delegate: EmojiReaction {
source: Style.svg(filename)
emojiId: model.emojiId
reactedByUser: model.didIReactWithThisEmoji
onCloseModal: {
if (reactedByUser) {
return
}
root.toggleReaction(emojiId)
}
}
}
}