Revert "Resume last sync"

This reverts commit 62ae0eeb17.
This commit is contained in:
M66B
2018-09-06 05:33:04 +00:00
parent 62ae0eeb17
commit 30be70fec6
8 changed files with 2 additions and 1893 deletions

View File

@@ -1226,19 +1226,6 @@ public class ServiceSynchronize extends LifecycleService {
int old = db.message().deleteMessagesBefore(folder.id, ago);
Log.i(Helper.TAG, folder.name + " local old=" + old);
if (folder.last_sync != null) {
Log.i(Helper.TAG, "Last sync=" + new Date(folder.last_sync));
cal.setTimeInMillis(folder.last_sync);
// For late arrivals and sync duration
cal.add(Calendar.DAY_OF_MONTH, -1);
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
ago = cal.getTimeInMillis();
Log.i(Helper.TAG, folder.name + " ago=" + new Date(ago));
}
// Get list of local uids
List<Long> uids = db.message().getUids(folder.id, ago);
Log.i(Helper.TAG, folder.name + " local count=" + uids.size());
@@ -1302,9 +1289,6 @@ public class ServiceSynchronize extends LifecycleService {
}
EntityOperation.process(this); // download small attachments
folder.last_sync = new Date().getTime();
db.folder().setFolderLastSync(folder.id, folder.last_sync);
Log.w(Helper.TAG, folder.name + " statistics added=" + added + " updated=" + updated + " unchanged=" + unchanged);
} finally {
Log.v(Helper.TAG, folder.name + " end sync");