Skip to content

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
@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.

3 participants