am 65bf9945: Fix search mailbox status on early-out when searching automerge: 207a35f

* commit '65bf9945341a0a39066e629472ed76864c6337d9':
  Fix search mailbox status on early-out when searching
This commit is contained in:
Tony Mantler 2014-11-02 17:28:22 +00:00 committed by Android Git Automerger
commit c48b966988

View File

@ -1505,6 +1505,10 @@ public class ImapService extends Service {
Math.min(numSearchResults - searchParams.mOffset, searchParams.mLimit);
destMailbox.updateMessageCount(context, numSearchResults);
if (numToLoad <= 0) {
// Tell UI that we're done loading messages
statusValues.put(Mailbox.SYNC_TIME, System.currentTimeMillis());
statusValues.put(Mailbox.UI_SYNC_STATUS, UIProvider.SyncStatus.NO_SYNC);
destMailbox.update(context, statusValues);
return 0;
}