Browse Source

Increase remote search page to five

main
M66B 6 years ago
parent
commit
9c92f19127
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java

+ 5
- 1
app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java View File

@ -61,6 +61,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
private IMAPFolder ifolder = null;
private Message[] imessages = null;
private static final int SEARCH_PAGE_SIZE = 5;
interface IBoundaryCallbackMessages {
void onLoading();
@ -153,13 +155,15 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
Log.i(Helper.TAG, "Boundary found messages=" + imessages.length);
}
int count = 0;
int index = imessages.length - 1;
while (index >= 0) {
if (imessages[index].getReceivedDate().getTime() < before)
try {
Log.i(Helper.TAG, "Boundary sync uid=" + ifolder.getUID(imessages[index]));
ServiceSynchronize.synchronizeMessage(context, folder, ifolder, (IMAPMessage) imessages[index], true);
break;
if (++count >= SEARCH_PAGE_SIZE)
break;
} catch (Throwable ex) {
Log.e(Helper.TAG, "Boundary " + ex + "\n" + Log.getStackTraceString(ex));
}


Loading…
Cancel
Save