2023-05-19 16:07:50 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
import shared 1.0
|
|
|
|
|
|
|
|
Row {
|
|
|
|
id: root
|
|
|
|
|
2023-12-18 22:34:10 +00:00
|
|
|
property var reactionsModel: []
|
2023-05-19 16:07:50 +00:00
|
|
|
|
|
|
|
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
|
2023-12-18 22:34:10 +00:00
|
|
|
reactedByUser: model.didIReactWithThisEmoji
|
2023-05-19 16:07:50 +00:00
|
|
|
onCloseModal: {
|
2023-12-18 22:34:10 +00:00
|
|
|
if (reactedByUser) {
|
|
|
|
return
|
|
|
|
}
|
2023-05-19 16:07:50 +00:00
|
|
|
root.toggleReaction(emojiId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|