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

Images are not cached after fetching from Firebase. #44

Open
TheLukaszNs opened this issue Jan 23, 2018 · 3 comments
Open

Images are not cached after fetching from Firebase. #44

TheLukaszNs opened this issue Jan 23, 2018 · 3 comments

Comments

@TheLukaszNs
Copy link

What's the problem?

It takes some time for the app to fetch images from Firebase. But it's really annoying to wait for it when launching EzNet - ALWAYS. We should cache images to fetch them only one time or after updates.

How to fix it?

We can fix it by editing Api.js's getThumbnail method to store/cache thumbnails in device storage. I'll get on this in the next days

@vibhavagarwal5
Copy link

I would like to take up this issue.

@agentmilindu
Copy link
Member

@vibhavagarwal5 Please proceed.

@vibhavagarwal5
Copy link

vibhavagarwal5 commented Feb 21, 2018

What i observed in this problem was that even if you want to cache it you need a storage. You can use AsyncStorage for it, but that still will take some time to load. But one advantage of using it would be that every time you open the app, right now, it fetches from the web but by using AsyncStorage you would now fetch it offline also.

So what AsyncStorage would solve for you is cache all whole JSON(that you create from the firebase data) offline. But still you would need to wait a bit for the app to load from the the AsyncStorage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants