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.
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
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.