mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Increase remote search page to five
This commit is contained in:
parent
143d5876d4
commit
9c92f19127
1 changed files with 5 additions and 1 deletions
|
@ -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,12 +155,14 @@ 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);
|
||||
if (++count >= SEARCH_PAGE_SIZE)
|
||||
break;
|
||||
} catch (Throwable ex) {
|
||||
Log.e(Helper.TAG, "Boundary " + ex + "\n" + Log.getStackTraceString(ex));
|
||||
|
|
Loading…
Reference in a new issue