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

refactor: Un-singletonize Paths & Updates #5092

Merged
merged 33 commits into from
Jan 16, 2024
Merged

refactor: Un-singletonize Paths & Updates #5092

merged 33 commits into from
Jan 16, 2024

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Jan 15, 2024

To unsingletonize Paths, I had to unsingletonize Updates

Nothing groundbreaking, but there's a few things to check & review before merging this in. There's probably also a few places that could bypass the getIApp()->getPaths() workaround


namespace chatterino::mock {

class EmptyApplication : public IApplication
{
public:
EmptyApplication()
: updates_(this->paths_)
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems scary. There should be a comment in the Updates constructor saying that it must never check for updates right away.

Copy link
Member Author

Choose a reason for hiding this comment

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

How so? (Also this is the mock app)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd assume that once I initialize the updates, it will eventually check for updates (or some other component will trigger it).

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing new in this PR really, except that we know where Updates is initialized. I have added some documentation to the Updates class in 596484f (#5092)

@pajlada pajlada marked this pull request as ready for review January 16, 2024 11:46
@pajlada pajlada enabled auto-merge (squash) January 16, 2024 20:37
@pajlada pajlada merged commit 718696d into master Jan 16, 2024
19 of 20 checks passed
@pajlada pajlada deleted the refactor/paths branch January 16, 2024 20:56
devJimmyboy pushed a commit to devJimmyboy/chatterino7 that referenced this pull request Feb 11, 2024
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