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-view): use underlyingChannel_ over channel_ #5248

Merged
merged 6 commits into from
Mar 16, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Mar 12, 2024

When setting a channel in a ChannelView that has messages, these are copied into the internal message buffer, but aren't added to the backing channel used for search. With this PR, the messages are both added to the backing buffer and to the channel. This also fixes a bug where filters weren't taken into account (non-issue here, as there aren't any set by default).

Seems like this broke in #1748.

Fixes #3861.


To help future patches, I commented all channels a view holds onto. It's a bit confusing to have three channels and one always needs to check what they are. In the past, we've made mistakes of using the wrong channel. For example, I missed this in #5123 and even #1748 missed this when handling layoutRequested.

@Nerixyz Nerixyz changed the title fix: copy messages into backing channel fix(channel-view): use underlyingChannel_ over channel_ Mar 12, 2024
@pajlada pajlada enabled auto-merge (squash) March 16, 2024 11:39
@pajlada pajlada merged commit 47c46b6 into Chatterino:master Mar 16, 2024
17 checks passed
@Nerixyz Nerixyz deleted the fix/searchy branch March 16, 2024 12:04
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.

Cannot search channel history when opening a duplicate tab of an existing channel
3 participants