emoji react
This commit is contained in:
parent
edb704339f
commit
cfa1a48bfb
1 changed files with 9 additions and 0 deletions
|
@ -98,6 +98,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
addReaction (event) {
|
||||||
|
const emoji = event.insertion
|
||||||
|
const existingReaction = this.status.emoji_reactions.find(r => r.name === emoji)
|
||||||
|
if (existingReaction && existingReaction.me) {
|
||||||
|
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
|
||||||
|
}
|
||||||
|
},
|
||||||
doActionWrap (button) {
|
doActionWrap (button) {
|
||||||
if (button.name === 'emoji') {
|
if (button.name === 'emoji') {
|
||||||
this.$refs.picker.showPicker()
|
this.$refs.picker.showPicker()
|
||||||
|
|
Loading…
Add table
Reference in a new issue