Keep executing API actions even if one fails. (#713)

This commit is contained in:
dosiecki 2015-07-09 17:44:20 -07:00
parent 9a03eb0c84
commit 5a440e0449

View file

@ -506,9 +506,6 @@ public class NBSyncService extends Service {
apiIds.addAll(fs.getFlatFeedIds());
}
// if any reading activities are pending, it makes no sense to recount yet
if (dbHelper.getActions(false).getCount() > 0) return;
UnreadCountResponse apiResponse = apiManager.getFeedUnreadCounts(apiIds);
if ((apiResponse == null) || (apiResponse.isError())) {
Log.w(this.getClass().getName(), "Bad response to feed_unread_count");
@ -580,10 +577,6 @@ public class NBSyncService extends Service {
if (! isStoryResponseGood(apiResponse)) return;
// if any reading activities happened during the API call, the result is now stale.
// discard it and start again
if (dbHelper.getActions(false).getCount() > 0) return;
FeedPagesSeen.put(fs, pageNumber);
totalStoriesSeen += apiResponse.stories.length;
FeedStoriesSeen.put(fs, totalStoriesSeen);