Browse Source

Fixed index

main
M66B 6 years ago
parent
commit
45a6b742bb
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/src/main/java/eu/faircode/email/ServiceSynchronize.java

+ 2
- 2
app/src/main/java/eu/faircode/email/ServiceSynchronize.java View File

@ -1353,7 +1353,7 @@ public class ServiceSynchronize extends LifecycleService {
Long[] ids = new Long[imessages.length]; Long[] ids = new Long[imessages.length];
Log.i(Helper.TAG, folder.name + " add=" + imessages.length); Log.i(Helper.TAG, folder.name + " add=" + imessages.length);
for (int i = imessages.length - 1; i >= 0; i -= SYNC_BATCH_SIZE) { for (int i = imessages.length - 1; i >= 0; i -= SYNC_BATCH_SIZE) {
int from = Math.max(0, i - SYNC_BATCH_SIZE) + 1;
int from = Math.max(0, i - SYNC_BATCH_SIZE + 1);
Log.i(Helper.TAG, folder.name + " update " + from + " .. " + i); Log.i(Helper.TAG, folder.name + " update " + from + " .. " + i);
Message[] isub = Arrays.copyOfRange(imessages, from, i + 1); Message[] isub = Arrays.copyOfRange(imessages, from, i + 1);
@ -1382,7 +1382,7 @@ public class ServiceSynchronize extends LifecycleService {
// Download messages/attachments // Download messages/attachments
Log.i(Helper.TAG, folder.name + " download=" + imessages.length); Log.i(Helper.TAG, folder.name + " download=" + imessages.length);
for (int i = imessages.length - 1; i >= 0; i -= DOWNLOAD_BATCH_SIZE) { for (int i = imessages.length - 1; i >= 0; i -= DOWNLOAD_BATCH_SIZE) {
int from = Math.max(0, i - DOWNLOAD_BATCH_SIZE) + 1;
int from = Math.max(0, i - DOWNLOAD_BATCH_SIZE + 1);
Log.i(Helper.TAG, folder.name + " download " + from + " .. " + i); Log.i(Helper.TAG, folder.name + " download " + from + " .. " + i);
Message[] isub = Arrays.copyOfRange(imessages, from, i + 1); Message[] isub = Arrays.copyOfRange(imessages, from, i + 1);


Loading…
Cancel
Save