Just mark search mailbox as not visible
This way we don't have to explicitly filter it in all the different places we do selections on mailboxes. Note that I didn't create an upgrade path for this. The only people with search mailboxes are probably developers right now, and worst case for people who experimented, they will just get the search mailbox visible Change-Id: I9a0bf6df9985418d467a7348ed99a36521641b89
This commit is contained in:
parent
659f60f734
commit
29c89ad17a
@ -268,7 +268,7 @@ public class Controller {
|
|||||||
m = new Mailbox();
|
m = new Mailbox();
|
||||||
m.mAccountKey = accountId;
|
m.mAccountKey = accountId;
|
||||||
m.mServerId = SEARCH_MAILBOX_SERVER_ID;
|
m.mServerId = SEARCH_MAILBOX_SERVER_ID;
|
||||||
m.mFlagVisible = true;
|
m.mFlagVisible = false;
|
||||||
m.mDisplayName = SEARCH_MAILBOX_SERVER_ID;
|
m.mDisplayName = SEARCH_MAILBOX_SERVER_ID;
|
||||||
m.mSyncInterval = Mailbox.CHECK_INTERVAL_NEVER;
|
m.mSyncInterval = Mailbox.CHECK_INTERVAL_NEVER;
|
||||||
m.mType = Mailbox.TYPE_SEARCH;
|
m.mType = Mailbox.TYPE_SEARCH;
|
||||||
@ -898,14 +898,14 @@ public class Controller {
|
|||||||
|
|
||||||
private static final HashMap<Long, SearchParams> sSearchParamsMap =
|
private static final HashMap<Long, SearchParams> sSearchParamsMap =
|
||||||
new HashMap<Long, SearchParams>();
|
new HashMap<Long, SearchParams>();
|
||||||
|
|
||||||
public void searchMore(long accountId) throws MessagingException {
|
public void searchMore(long accountId) throws MessagingException {
|
||||||
SearchParams params = sSearchParamsMap.get(accountId);
|
SearchParams params = sSearchParamsMap.get(accountId);
|
||||||
if (params == null) return;
|
if (params == null) return;
|
||||||
params.mOffset += params.mLimit;
|
params.mOffset += params.mLimit;
|
||||||
searchMessages(accountId, params);
|
searchMessages(accountId, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for messages on the (IMAP) server; do not call this on the UI thread!
|
* Search for messages on the (IMAP) server; do not call this on the UI thread!
|
||||||
* @param accountId the id of the account to be searched
|
* @param accountId the id of the account to be searched
|
||||||
|
@ -141,8 +141,7 @@ class MailboxFragmentAdapter extends CursorAdapter {
|
|||||||
" AND " + Mailbox.USER_VISIBLE_MAILBOX_SELECTION;
|
" AND " + Mailbox.USER_VISIBLE_MAILBOX_SELECTION;
|
||||||
/** All system mailboxes for an account */
|
/** All system mailboxes for an account */
|
||||||
private static final String SYSTEM_MAILBOX_SELECTION = ALL_MAILBOX_SELECTION
|
private static final String SYSTEM_MAILBOX_SELECTION = ALL_MAILBOX_SELECTION
|
||||||
+ " AND " + MailboxColumns.TYPE + "!=" + Mailbox.TYPE_MAIL
|
+ " AND " + MailboxColumns.TYPE + "!=" + Mailbox.TYPE_MAIL;
|
||||||
+ " AND " + MailboxColumns.TYPE + "!=" + Mailbox.TYPE_SEARCH;
|
|
||||||
/** All mailboxes with the given parent */
|
/** All mailboxes with the given parent */
|
||||||
private static final String USER_MAILBOX_SELECTION_WITH_PARENT = ALL_MAILBOX_SELECTION
|
private static final String USER_MAILBOX_SELECTION_WITH_PARENT = ALL_MAILBOX_SELECTION
|
||||||
+ " AND " + MailboxColumns.PARENT_KEY + "=?"
|
+ " AND " + MailboxColumns.PARENT_KEY + "=?"
|
||||||
|
Loading…
Reference in New Issue
Block a user