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 channel search when custom scrollback limit is used #4496

Merged
merged 5 commits into from
Apr 1, 2023

Conversation

kornes
Copy link
Contributor

@kornes kornes commented Mar 31, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

PR introduces 2 changes:

  • Channel messages_ field is initialized to scrollbackSplitLimit setting, so it doesnt use default value of 1000.
    All code using Channel::getMessageSnapshot() was affected as it returned only up to 1k messages, while ChannelView respected custom scrollback setting, so it created at least few problems.
    Example: https://i.supa.codes/Fn6J8.mp4 text selection would move up on each new message instead of holding its position.
  • use scrollbackSplitLimit for SearchPopup channelView, so all messages for single channel are always searchable.

fixes #4495
Fixes #4324

@kornes kornes marked this pull request as draft March 31, 2023 06:28
fix init order
@kornes kornes force-pushed the fix_channel-msg-limit branch from 2fe1fb7 to 1240417 Compare March 31, 2023 06:36
@dnsge
Copy link
Contributor

dnsge commented Mar 31, 2023

#4324

I knew I wasn't crazy! Does this PR also fix user card message history? It looks like it should.

@kornes
Copy link
Contributor Author

kornes commented Apr 1, 2023

usercards were also affected by this bug so #4324 was no delusion :D

i spent some time looking for side effects and tested everything i planned, found no issues so PR is ready for review

@kornes kornes marked this pull request as ready for review April 1, 2023 04:19
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

👍 Thank you @kornes

@pajlada pajlada enabled auto-merge (squash) April 1, 2023 12:29
@pajlada pajlada merged commit b209c50 into Chatterino:master Apr 1, 2023
@kornes kornes deleted the fix_channel-msg-limit branch April 1, 2023 15:36
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