Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: prefer visible/selected channels when joining #5850

Merged
merged 5 commits into from
Jan 24, 2025

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jan 23, 2025

When we join channels because Chatterino (re-)connected, the join requests for channels that are currently selected are now put first. When starting Chatterino, this makes it seem like it's faster than before (even though it's as fast as before).

One downside of this PR is that TwitchIrcServer now knows about WindowManager, Window, SplitNotebook, SplitContainer, and Split.
An alternative would be to track the selected channels somewhere (i.e. add/remove them from methods in Split or SplitNotebook). I think that approach is more complex with little to no benefit.


When searching for joinBucket_ in TwitchIrcServer, you might find another use. We don't call this when starting Chatterino, because the windows are initialized before the IRC connections (the connection isn't connected yet).

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.

Small nits - the activeChannel & lock change is a nice bonus refactor here

src/providers/twitch/TwitchIrcServer.cpp Outdated Show resolved Hide resolved
src/providers/twitch/TwitchIrcServer.cpp Outdated Show resolved Hide resolved
@pajlada pajlada enabled auto-merge (squash) January 24, 2025 11:16
@pajlada pajlada merged commit 35b15c4 into Chatterino:master Jan 24, 2025
18 checks passed
@Nerixyz Nerixyz deleted the feat/prefer-selected-channels branch January 24, 2025 13:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JOIN rate limit improvements
2 participants