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

Only construct RecentEmojiManager if one hasn’t already been set #478

Merged
merged 2 commits into from
Oct 26, 2020

Conversation

lukesleeman
Copy link
Contributor

This PR fixes issue #476 - Previously the RecentEmojiManager was being constructed when the builder was created. This PR changes the builders recentEmoji field to @nullable and performs the initialisation when build is called. This way people can set their own emoji managers and manage the threading of any disk reads in whatever way suits them.

vanniktech
vanniktech previously approved these changes Oct 26, 2020
Copy link
Collaborator

@rubengees rubengees left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@mario mario left a comment

Choose a reason for hiding this comment

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

Sure, but why don't we do the same with variantEmoji then?

@vanniktech
Copy link
Owner

Sure, but why don't we do the same with variantEmoji then?

Can do in a separate PR.

@vanniktech vanniktech merged commit 8b5752e into vanniktech:master Oct 26, 2020
@lukesleeman
Copy link
Contributor Author

Sure, but why don't we do the same with variantEmoji then?

The main reason for extracting this one out was the RecentEmojiManager does a disk read on the main thread when its constructed. 🤞🤞 I think the variant emoji is a bit more "lightweight" to construct

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.

4 participants