aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status/status.js')
-rw-r--r--src/components/status/status.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 8c6fc0cf..cc0c9e06 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -280,10 +280,7 @@ const Status = {
return this.mergedConfig.hidePostStats
},
emojiReactions () {
- return {
- '🤔': [{ 'id': 'xyz..' }, { 'id': 'zyx...' }],
- '🐻': [{ 'id': 'abc...' }]
- }
+ return this.status.emojiReactions
},
...mapGetters(['mergedConfig'])
},
@@ -385,6 +382,22 @@ const Status = {
setMedia () {
const attachments = this.attachmentSize === 'hide' ? this.status.attachments : this.galleryAttachments
return () => this.$store.dispatch('setMedia', attachments)
+ },
+ reactedWith (emoji) {
+ return this.status.reactedWithEmoji.includes(emoji)
+ },
+ reactWith (emoji) {
+ this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
+ },
+ unreact (emoji) {
+ this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
+ },
+ emojiOnClick (emoji, event) {
+ if (this.reactedWith(emoji)) {
+ this.unreact(emoji)
+ } else {
+ this.reactWith(emoji)
+ }
}
},
watch: {