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

Bug Fix: double initial fetch message from ChatPopup #70

Merged
merged 2 commits into from
May 8, 2024

Conversation

yen-tt
Copy link
Collaborator

@yen-tt yen-tt commented May 8, 2024

when openOnLoad and showUnreadNotification prop are both in use, initial message was fetched twice -- once from ChatPopUp component and once from ChatPanel. This is because useFetchInitialMessage doesn't share state between the two component.

This PR updates it so ChatPopUp component only fetch when ChatPanel is not render, otherwise ChatPanel should always do the fetching of the initial message

J=CLIP-1231
TEST=manual

see that it works with both openOnLoad and showUnreadNotification on

test-openonload.mov

@yen-tt yen-tt requested a review from a team as a code owner May 8, 2024 17:40
@yen-tt yen-tt merged commit 9dd7b00 into main May 8, 2024
9 checks passed
@yen-tt yen-tt deleted the dev/fix-initial-fetch branch May 8, 2024 18:02
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