Abhimanyu14 / compose-emoji-picker

Apache License 2.0
32 stars 1 forks source link

Fetching emojis #3

Closed nizam-betterapp closed 7 months ago

nizam-betterapp commented 7 months ago

I see that you are using disk caching to save the emojis to be working offline. even when the user is online, why not show the offline emojis first and then update the cache from the internet. This will be useful since it takes a while for users to see the emoji's and the user sees "Fetching Emoji's". if the user is offline, then it's super quick.

Please let me know if you need any clarifications on this issue. Thanks :)

Abhimanyu14 commented 7 months ago

Hi @nizam-betterapp, I am using OkHttp's default caching mechanism. I do not have any custom logic.

I tried this from my end and the loading time is not too bad. Could you kindly share more info if you have any thoughts on what caching optimization can be done to enhance this experience?

Abhimanyu14 commented 7 months ago

Upon further testing, I noticed that the network call is only made when the cache isn't available.

nizam-betterapp commented 7 months ago

Ok. Thanks for the clarification.