mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Keep executing API actions even if one fails. (#713)
This commit is contained in:
parent
9a03eb0c84
commit
5a440e0449
1 changed files with 0 additions and 7 deletions
|
@ -506,9 +506,6 @@ public class NBSyncService extends Service {
|
||||||
apiIds.addAll(fs.getFlatFeedIds());
|
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);
|
UnreadCountResponse apiResponse = apiManager.getFeedUnreadCounts(apiIds);
|
||||||
if ((apiResponse == null) || (apiResponse.isError())) {
|
if ((apiResponse == null) || (apiResponse.isError())) {
|
||||||
Log.w(this.getClass().getName(), "Bad response to feed_unread_count");
|
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 (! 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);
|
FeedPagesSeen.put(fs, pageNumber);
|
||||||
totalStoriesSeen += apiResponse.stories.length;
|
totalStoriesSeen += apiResponse.stories.length;
|
||||||
FeedStoriesSeen.put(fs, totalStoriesSeen);
|
FeedStoriesSeen.put(fs, totalStoriesSeen);
|
||||||
|
|
Loading…
Add table
Reference in a new issue