Update folder structure on every POP or IMAP sync
b/10729228 Change-Id: I9e62d5de10222f1d81b47a68dd0b3ab05de5436d
This commit is contained in:
parent
17d014dfdf
commit
1a7838eed7
@ -206,14 +206,14 @@ public class PopImapSyncAdapterService extends Service {
|
|||||||
LogUtils.d(TAG, extras.toString());
|
LogUtils.d(TAG, extras.toString());
|
||||||
long mailboxId =
|
long mailboxId =
|
||||||
extras.getLong(Mailbox.SYNC_EXTRA_MAILBOX_ID, Mailbox.NO_MAILBOX);
|
extras.getLong(Mailbox.SYNC_EXTRA_MAILBOX_ID, Mailbox.NO_MAILBOX);
|
||||||
if (mailboxId == Mailbox.NO_MAILBOX) {
|
|
||||||
// Update folders.
|
// We update our folder structure on every sync.
|
||||||
EmailServiceProxy service =
|
final EmailServiceProxy service =
|
||||||
EmailServiceUtils.getServiceForAccount(context, acct.mId);
|
EmailServiceUtils.getServiceForAccount(context, acct.mId);
|
||||||
service.updateFolderList(acct.mId);
|
service.updateFolderList(acct.mId);
|
||||||
mailboxId = Mailbox.findMailboxOfType(context, acct.mId,
|
mailboxId = Mailbox.findMailboxOfType(context, acct.mId,
|
||||||
Mailbox.TYPE_INBOX);
|
Mailbox.TYPE_INBOX);
|
||||||
}
|
|
||||||
if (mailboxId == Mailbox.NO_MAILBOX) return;
|
if (mailboxId == Mailbox.NO_MAILBOX) return;
|
||||||
boolean uiRefresh =
|
boolean uiRefresh =
|
||||||
extras.getBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, false);
|
extras.getBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user