Skip to content

Fix spurious error and incorrect state change when adding a reaction twice#12957

Merged
Gargron merged 2 commits intomastodon:masterfrom
ClearlyClaire:fixes/announcement-fixes
Jan 25, 2020
Merged

Fix spurious error and incorrect state change when adding a reaction twice#12957
Gargron merged 2 commits intomastodon:masterfrom
ClearlyClaire:fixes/announcement-fixes

Conversation

@ClearlyClaire
Copy link
Copy Markdown
Contributor

From the emoji picker, it's easy to add an already-added reaction. Doing so results in the front-end optimistically upping the number, then decrementing it on error, and worse, marking the reaction as not voted by ourselves.

This PR avoids that if we believe we have already voted (this may be out of sync if several clients are involved, so we still try the request—in the worst case, we fail in the same way as before, in other cases we fail gracefully instead of adding distracting visual changes, an error popup, and an incorrect end state)

Also fix the box having an unneeded top border

@Gargron Gargron merged commit c06d2ff into mastodon:master Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants