Closed jterps08 closed 7 years ago
@jterps08 https://api-dev.powerli.ne/api/v2/activities?page=1 This API returned 20 items.
@devotebest ok, so we might want to change the return to 15 items @igaponov
@devotebest can you confirm we have local caching in the mobile app? We used to have it per the commit links I put above, but it may have been removed in the past. We need to have local caching so that the app isn't reloading the newsfeed when the user switches to a different app and comes back or switches to a different screen and comes back...
@jterps08 I confirmed there is local caching in mobile app. https://github.com/PowerlineApp/powerline-mobile/blob/develop/www/js/services/activity.js#L47-L50
and https://github.com/PowerlineApp/powerline-mobile/commit/4d66c633374be03bc48b251a31a0f01e1f4a8b82 is old commit.
prepare()
function is added already.
https://github.com/PowerlineApp/powerline-mobile/blob/develop/www/js/controllers/home.js#L77
This was the original infinite scrolling and local caching work that we implemented... https://github.com/PowerlineApp/powerline-mobile/commit/e2d8a03a98ab9f3fc1cd0df9b91dc0f97834f027
I'm not sure why this
prepare()
was commented-out/removed by Erik. https://github.com/PowerlineApp/powerline-mobile/commit/4d66c633374be03bc48b251a31a0f01e1f4a8b82We need to load only 10-15 items at a time and at initial load. And we need to leverage local caching. The newsfeed is jittery/sluggish until all items complete loading, so it would be good to figure out how to fix this for better user experience.