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

adds filterUnsupported method to EmojiPickerUtils #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maeddin
Copy link

@maeddin maeddin commented Nov 5, 2024

closes #220

@Fintasys
Copy link
Owner

Can you provide more contex to this? In what situation this would be useful for the users?

@maeddin
Copy link
Author

maeddin commented Nov 12, 2024

@Fintasys

Can you provide more contex to this? In what situation this would be useful for the users?

I need this method, for example, to be able to display the emojis of the corresponding platform myself, as I would like to preload them. Otherwise there is always a short loading time when opening the EmojiPicker, as this method is called every time it is opened.

I haven't found a good way to integrate preloading directly into the package, so I would like to make this method publicly available.

@Fintasys
Copy link
Owner

@maeddin I see, but calling filterUnsupported wouldn't do any preloading. It would just filter emoji based on platform and return the list to you. When the EmojiPicker is used it would load all emoji again. In general the waiting time to load should be milliseconds, so I wonder why you seeing loading indicator. Which platform are you referring to?
Nevertheless, I understand the issue with the preloading that eventually some people face. I would rather suggest to cache the emojiList in the Utils and add an manual initialization method. I might find time trying to come up with a PR in the next days, if you can wait.

@maeddin
Copy link
Author

maeddin commented Nov 12, 2024

@Fintasys I preload the emojis I need once when the app is started so that they are already loaded when my EmojiPicker opens for the first time. It only takes milliseconds to load, but the emojis still appear after the first frame, which is why I have implemented preloading for myself. Since I have also implemented the entire EmojiPicker myself due to design specifications, it is easier for me to call filterUnsupported directly. This way I can handle the caching myself and also determine when the preloading takes place.

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.

add filterUnsupported method to EmojiPickerUtils
2 participants