don't throw away fetched data if going offline shortly thereafter. fix delay in sync lifecycle on manycore devices.

This commit is contained in:
dosiecki 2016-11-14 18:23:12 -08:00
parent 206de51d39
commit 11256a8ad9

View file

@ -425,7 +425,7 @@ public class NBSyncService extends Service {
return;
}
if (stopSync()) return;
if (HaltNow) return;
if (dbHelper.getActions(false).getCount() > 0) return;
// a metadata sync invalidates pagination and feed status
@ -512,9 +512,9 @@ public class NBSyncService extends Service {
lastFFWriteMillis = System.currentTimeMillis() - startTime;
lastFeedCount = feedValues.size();
cleanupService.start(startId);
unreadsService.start(startId);
UnreadsService.doMetadata();
unreadsService.start(startId);
cleanupService.start(startId);
} finally {
FFSyncRunning = false;