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

perf: fewer MessageList re-renders #4594

Merged
merged 1 commit into from
Feb 6, 2025
Merged

perf: fewer MessageList re-renders #4594

merged 1 commit into from
Feb 6, 2025

Conversation

WofWca
Copy link
Collaborator

@WofWca WofWca commented Feb 2, 2025

No description provided.

Copy link
Member

@nicodh nicodh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is just a followup to #4593 but the changes are included

@WofWca
Copy link
Collaborator Author

WofWca commented Feb 3, 2025

Yes. Apologies for forgetting to mention this.

Don't re-render it on unread count change.
Namely, when scrolling through unread messages.
@WofWca WofWca force-pushed the wofwca/perf-message-list branch from 766baba to 77fe38d Compare February 6, 2025 09:09
@WofWca WofWca merged commit 1a752fa into main Feb 6, 2025
6 of 9 checks passed
@WofWca WofWca deleted the wofwca/perf-message-list branch February 6, 2025 09:09
WofWca added a commit that referenced this pull request Feb 15, 2025
Reproduction steps:
1. Open a chat.
2. Scroll it up.
3. Receive a message or a few in this chat.
4. Scroll down to read all the new messages.
  The counter will be updating as you read the messages, as expected.
5. Scroll up a bit.

The "jump down" button will appear again,
but with an incorrect count.

The bug was introduced in 1a752fa
(#4594).

This commit somewhat reverts it, i.e. ensures that
`useUnreadCount` does not lose its state when we start / stop
displaying the "jump down" button.
WofWca added a commit that referenced this pull request Feb 17, 2025
Reproduction steps:
1. Open a chat.
2. Scroll it up.
3. Receive a message or a few in this chat.
4. Scroll down to read all the new messages.
  The counter will be updating as you read the messages, as expected.
5. Scroll up a bit.

The "jump down" button will appear again,
but with an incorrect count.

The bug was introduced in 1a752fa
(#4594).

This commit somewhat reverts it, i.e. ensures that
`useUnreadCount` does not lose its state when we start / stop
displaying the "jump down" button.
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