When we migrate Exchange folders, set the sync status to INITIAL_SYNC_NEEDED
b/17443087 When we migrate exchange accounts, we copy mailboxes over to the new account (in order to preserve sync frequency and window). The problem with this is, you may have many accounts/mailboxes. After starting the app, it may take quite a long time before all mailboxes are synced. If the user visits some mailbox near the bottom, they'll see a misleading "folder is empty" view. Now, when migrating, we'll set the uisyncstatus to INITIAL_SYNC_NEEDED. Here I needed to add INITAL_SYNC_NEEDED to the list of states that EmailConversationCursor will consider incompletely loaded. Change-Id: Idef13adf9d691c03665830a2f926b1806d7591da
This commit is contained in:
parent
d10ae46e60
commit
3c2f782c35
@ -96,6 +96,8 @@ public abstract class EmailContent {
|
|||||||
public static final int SYNC_STATUS_USER = UIProvider.SyncStatus.USER_REFRESH;
|
public static final int SYNC_STATUS_USER = UIProvider.SyncStatus.USER_REFRESH;
|
||||||
public static final int SYNC_STATUS_BACKGROUND = UIProvider.SyncStatus.BACKGROUND_SYNC;
|
public static final int SYNC_STATUS_BACKGROUND = UIProvider.SyncStatus.BACKGROUND_SYNC;
|
||||||
public static final int SYNC_STATUS_LIVE = UIProvider.SyncStatus.LIVE_QUERY;
|
public static final int SYNC_STATUS_LIVE = UIProvider.SyncStatus.LIVE_QUERY;
|
||||||
|
public static final int SYNC_STATUS_INITIAL_SYNC_NEEDED =
|
||||||
|
UIProvider.SyncStatus.INITIAL_SYNC_NEEDED;
|
||||||
|
|
||||||
public static final int LAST_SYNC_RESULT_SUCCESS = UIProvider.LastSyncResult.SUCCESS;
|
public static final int LAST_SYNC_RESULT_SUCCESS = UIProvider.LastSyncResult.SUCCESS;
|
||||||
public static final int LAST_SYNC_RESULT_AUTH_ERROR = UIProvider.LastSyncResult.AUTH_ERROR;
|
public static final int LAST_SYNC_RESULT_AUTH_ERROR = UIProvider.LastSyncResult.AUTH_ERROR;
|
||||||
|
@ -77,7 +77,8 @@ public class EmailConversationCursor extends CursorWrapper implements
|
|||||||
mExtras.putInt(UIProvider.CursorExtraKeys.EXTRA_TOTAL_COUNT, mailbox.mTotalCount);
|
mExtras.putInt(UIProvider.CursorExtraKeys.EXTRA_TOTAL_COUNT, mailbox.mTotalCount);
|
||||||
if (mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_BACKGROUND
|
if (mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_BACKGROUND
|
||||||
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_USER
|
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_USER
|
||||||
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_LIVE) {
|
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_LIVE
|
||||||
|
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_INITIAL_SYNC_NEEDED) {
|
||||||
mExtras.putInt(UIProvider.CursorExtraKeys.EXTRA_STATUS,
|
mExtras.putInt(UIProvider.CursorExtraKeys.EXTRA_STATUS,
|
||||||
UIProvider.CursorStatus.LOADING);
|
UIProvider.CursorStatus.LOADING);
|
||||||
} else if (mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_NONE) {
|
} else if (mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_NONE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user