Emoji Reactions - fixes and improvements
This commit is contained in:
parent
17b6d8ddb8
commit
f6b482be51
18 changed files with 236 additions and 47 deletions
|
@ -22,7 +22,12 @@ const ReactButton = {
|
|||
this.showTooltip = false
|
||||
},
|
||||
addReaction (event, emoji) {
|
||||
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
|
||||
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 })
|
||||
}
|
||||
this.closeReactionSelect()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
|
||||
.reaction-picker-filter {
|
||||
padding: 0.5em;
|
||||
display: flex;
|
||||
input {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.reaction-picker-divider {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue