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

Prevent sending of duplicate tips in hyperchats - Fix attempt #3034

Closed

Conversation

keikari
Copy link
Contributor

@keikari keikari commented Jan 7, 2024

Fixes

Duplicate tips in hyperchats. Spamming the button allows couple tips to pass.

duplicate-tips.mp4

Info

Seems that the useState() updates too slow. useRef() seems to work better. Good enough as a temp fix for now?

@infinite-persistence
Copy link
Collaborator

I think the root cause is that we now need to fetch creator settings (for membership settings and whatnot) but did not listen to the state.

  • Watching selectFetchingCreatorSettings and adding that to the disable logic might be sufficient and clearer than adding a shadow state.

This PR's solution is also fine, but if we go this route, do add a comment next to the ref-variable linking back to this PR, indicating that it's temp band aid.

@keikari keikari closed this Jan 8, 2024
@keikari keikari force-pushed the prevent-duplicate-hyperchat-tips branch from 7cd9b84 to 4c6114a Compare January 8, 2024 08:41
@keikari
Copy link
Contributor Author

keikari commented Jan 8, 2024

Oops, tried force pushing other branch to this, and not sure what happened, or how to re-open.
Made new PR #3035

EDIT: Seeing now how, but already made the other one

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