Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jan 25, 2020

Conversation

ClearlyClaire
Copy link
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.

None yet

2 participants