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

feat: launch arg to start logged in as a supplied user #5626

Merged
merged 3 commits into from
Oct 6, 2024

Conversation

lbrooney
Copy link
Contributor

@lbrooney lbrooney commented Oct 5, 2024

Add a new optional launch arg , --login <username>, that allows a user to specify which account they want to start Chatterino logged in as. If an account with the supplied username does not exist, then it starts anonymous. This arg is essentially equivalent to modifying current in settings.json before launch.

I tried to implement similar to how channel args are applied in WindowManager by applying the username in TwitchAccountManager, but I don't know if it would be preferred to elevate it to AccountController instead. I did not implement the platform specificity that the channel and activate options have.

I don't know if this is worth noting, but a side effect is that if the user never switches accounts, the current saved in setting.json will be set to whatever username they provided.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/providers/twitch/TwitchAccountManager.cpp Show resolved Hide resolved
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.

Great first PR - thank you!

As a first-time contributor, you are now eligible to be listed in the About page in Chatterino.

If you want this, you can open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Read the comments at the top for instructions.

@pajlada pajlada enabled auto-merge (squash) October 6, 2024 08:10
@pajlada pajlada merged commit 0085fb6 into Chatterino:master Oct 6, 2024
18 checks passed
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