2023-05-19 16:07:50 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2023-05-19 16:07:50 +00:00
|
|
|
import utils 1.0
|
|
|
|
import shared 1.0
|
|
|
|
|
|
|
|
Row {
|
|
|
|
id: root
|
|
|
|
|
2024-10-01 15:10:46 +00:00
|
|
|
property var reactionsModel
|
2023-05-19 16:07:50 +00:00
|
|
|
|
|
|
|
signal toggleReaction(int emojiId)
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
spacing: Theme.halfPadding
|
|
|
|
leftPadding: Theme.halfPadding
|
|
|
|
rightPadding: Theme.halfPadding
|
2023-05-19 16:07:50 +00:00
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: root.reactionsModel
|
|
|
|
delegate: EmojiReaction {
|
2024-10-15 19:26:12 +00:00
|
|
|
source: Theme.svg(model.filename)
|
2023-05-19 16:07:50 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|