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

fix: scroll to bottom when setting a channel #5748

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Dec 1, 2024

In #5737 I changed performLayout to queueLayout in ChannelView::setChannel. This causes usercards and reply thread popups to have their scrollbar at the top when opened (specifically, this would resolve to true before, because the scrollbar was still hidden).
This PR fixes that. For the various channel views, we need to make sure that they're properly initialized. For emojis, we need to make sure the view starts at the top, so we set the channel first and then add messages. On the other hand, for reply thread popups, we want to scroll to the bottom, hence we set the (virtual) channel after adding all messages.

I don't want to revert #5737 just because we relied on that initial layout.

@pajlada pajlada merged commit 3c2a422 into Chatterino:master Dec 2, 2024
18 checks passed
@Nerixyz Nerixyz deleted the fix/no-scrolling branch December 2, 2024 16:31
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