aboutsummaryrefslogtreecommitdiff
path: root/src/components/react_button
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-02-13 09:32:45 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-02-13 09:32:45 +0300
commite3d0b2f137ccb355c16788e9b890df609cee1698 (patch)
tree1553a825f06731b32433206e24af7a0fa96b757a /src/components/react_button
parenta52ae1ebeb0e69c4484122be8fca7e68b030db32 (diff)
parent96dc297babd5797b9307af8676719c2eb8cd80e2 (diff)
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop
Diffstat (limited to 'src/components/react_button')
-rw-r--r--src/components/react_button/react_button.js7
-rw-r--r--src/components/react_button/react_button.vue4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index 6fb2a780..a6cf5b94 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -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()
}
},
diff --git a/src/components/react_button/react_button.vue b/src/components/react_button/react_button.vue
index c925dd71..fb43ebaf 100644
--- a/src/components/react_button/react_button.vue
+++ b/src/components/react_button/react_button.vue
@@ -54,6 +54,10 @@
.reaction-picker-filter {
padding: 0.5em;
+ display: flex;
+ input {
+ flex: 1;
+ }
}
.reaction-picker-divider {