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

[frontend] Do optimistic update when approving/rejecting/suspending account #2892

Merged
merged 1 commit into from
May 2, 2024

Conversation

tsmethurst
Copy link
Contributor

@tsmethurst tsmethurst commented May 2, 2024

Description

If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements.

If this is a documentation change, please briefly describe what you've changed and why.

Cheeky little PR to do optimistic updates when taking account moderation actions, to provide more immediate feedback to the admin. Now instead of clicking and having to refresh a few times while the backend does its things and marks the account as suspended / approved / rejected or whatever, the change is reflected immediately in the frontend redux cache state.

See: https://redux-toolkit.js.org/rtk-query/usage/manual-cache-updates#optimistic-updates

Checklist

Please put an x inside each checkbox to indicate that you've read and followed it: [ ] -> [x]

If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).

@tsmethurst tsmethurst merged commit 35b1c54 into main May 2, 2024
3 checks passed
@tsmethurst tsmethurst deleted the account_moderation_optimistic_updates branch May 2, 2024 15:57
nyarla pushed a commit to nyarla/gotosocial-modded that referenced this pull request Jun 19, 2024
nyarla pushed a commit to nyarla/gotosocial-modded that referenced this pull request Jun 19, 2024
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.

1 participant