From 1a7838eed7558a8f5caa23128518cae09d8a034f Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Fri, 13 Sep 2013 13:18:56 -0700 Subject: [PATCH] Update folder structure on every POP or IMAP sync b/10729228 Change-Id: I9e62d5de10222f1d81b47a68dd0b3ab05de5436d --- .../email/service/PopImapSyncAdapterService.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/android/email/service/PopImapSyncAdapterService.java b/src/com/android/email/service/PopImapSyncAdapterService.java index 669badf06..bfe4efe27 100644 --- a/src/com/android/email/service/PopImapSyncAdapterService.java +++ b/src/com/android/email/service/PopImapSyncAdapterService.java @@ -206,14 +206,14 @@ public class PopImapSyncAdapterService extends Service { LogUtils.d(TAG, extras.toString()); long mailboxId = extras.getLong(Mailbox.SYNC_EXTRA_MAILBOX_ID, Mailbox.NO_MAILBOX); - if (mailboxId == Mailbox.NO_MAILBOX) { - // Update folders. - EmailServiceProxy service = - EmailServiceUtils.getServiceForAccount(context, acct.mId); - service.updateFolderList(acct.mId); - mailboxId = Mailbox.findMailboxOfType(context, acct.mId, - Mailbox.TYPE_INBOX); - } + + // We update our folder structure on every sync. + final EmailServiceProxy service = + EmailServiceUtils.getServiceForAccount(context, acct.mId); + service.updateFolderList(acct.mId); + mailboxId = Mailbox.findMailboxOfType(context, acct.mId, + Mailbox.TYPE_INBOX); + if (mailboxId == Mailbox.NO_MAILBOX) return; boolean uiRefresh = extras.getBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, false);