Devsoc-BPGC / DoJMA

DoJMA news app for BITS Pilani K K Birla Goa Campus students
6 stars 18 forks source link

remove realm for getting articles through API #156

Open aryanagarwal15 opened 5 years ago

aryanagarwal15 commented 5 years ago

@tanmaydixit allot this issue to me. I'll do this by the next week.

Will be removing realm for getting articles from the api and will change search logic and issues fragment accordingly.

I want this to be pushed in the next update. So please hold on to releasing the update till this issue is not fixed.

Rushi98 commented 5 years ago

@aryanagarwal15 Why is this required?

aryanagarwal15 commented 5 years ago

Currently most of the students don't have updated articles. They either have to be very active to view the updated articles or manually refresh it. Thus making just one API call to get just the first 20 articles will make sure that everyone will have the updated articles at all times.

Rushi98 commented 5 years ago

What does realm have to do with the APIs not being called frequently?

aryanagarwal15 commented 5 years ago

currently we are saving all articles and making all requests at a single time and then the api is never called automatically once the articles are updated in Realm. We really don't want people to download all the articles on the website. This is just wasting space.

The new approach that I am proposing will make sure that only one api call is done on app opening. And space optimization.

Rushi98 commented 5 years ago

The article data size doesn't consume much disk space. Saving on disk allows for offline reading.

For the update issue, trigger API call when app is started.