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

chat: fix infinite refetch bug with scrollTo, fix chat bug, navigate to thread parent #3113

Merged
merged 6 commits into from
Dec 12, 2023

Conversation

patosullivan
Copy link
Member

Fixes LAND-1364, the scrollTo refetch bug issue. This was caused by the use of the msg param in the case of a message we wanted to highlight within a thread. We used the same param for scrollTo in the ChatWindow, and since we couldn't find the scrollTo in the existing messages (and never would since it exists outside of the main chat window, in a thread) the new useEffect that fixed search was firing in a loop. This was fixed by changing the url param for finding a thread message to thread-msg.

Also fixes LAND-1331 by adding the useEffect back in, this time with a new dependent variable that uses either the parent ID in the router or the id from the msg param. This same variable is also used to scroll to the thread parent in the main window, which is something that wasn't working on mainnet/develop before. I don't think we have an issue for this one.

@mrozanski mrozanski merged commit c7b6c39 into develop Dec 12, 2023
1 check passed
@mrozanski mrozanski deleted the po/fix-search-and-scrollto-refetch-bug branch December 12, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants