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);