ios-nd-networking icon indicating copy to clipboard operation
ios-nd-networking copied to clipboard

Refresh contents on favorites/watchlist

Open OwenLaRosa opened this issue 5 years ago • 1 comments

Right now, the watchlist and favorites list are initially populated from viewDidLoad. Then, we rely on adding and removing movies from the lists to keep the data in sync.

This works well if our app was the only app accessing account data. However, if the user was logged into the movie manager on a different device, or makes changes to their watchlist and favorites list on the Movie Databse website, the lists stored in the app will not be up-to-date until the next time the user logs in.

Ideally, our app be notified (receive a push) from the Movie Database that a users' list has changed, and then decide what to do to handle that response. This works great to avoid making too many network requests, but unfortunately, this functionality is not currently offered by the TMDB API.

The best we can do is to update the data, and a number of approaches might work

  • Periodically redownload the watchlist and favorites list from TMDB (called polling).
  • Letting the user update the data with a refresh button
  • Or as an alternative, implement "pull down to refresh" functionality on the table view.

Each solution (and any others) have their own benefits and drawbacks, but providing a way for users to get the most up-to-date movie lists would prevent this buggy behavior.

OwenLaRosa avatar Nov 09 '18 22:11 OwenLaRosa

the pull down to refresh method is quite simple to implement.

Take a look at https://www.youtube.com/watch?v=RvDYlPRm5Ww

BrentMifsud avatar Jun 02 '19 00:06 BrentMifsud