Merge "Remove temp code that was causing an NPE"
This commit is contained in:
commit
2be03be9b3
|
@ -583,10 +583,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
long nextHighlightedMailboxId, long nextSelectedMailboxId) {
|
||||
|
||||
startLoading(nextParentMailboxId, nextHighlightedMailboxId);
|
||||
|
||||
if (nextSelectedMailboxId != Mailbox.NO_MAILBOX) {
|
||||
mCallback.onMailboxSelected(getAccountId(), nextSelectedMailboxId, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
new FindParentMailboxTask(
|
||||
|
@ -695,8 +691,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
* @param parentMailboxId Mailbox ID to be used as the "parent" mailbox
|
||||
* @param highlightedMailboxId Mailbox ID that should be highlighted when the data is loaded.
|
||||
*/
|
||||
private void startLoading(long parentMailboxId, long highlightedMailboxId
|
||||
) {
|
||||
private void startLoading(long parentMailboxId, long highlightedMailboxId) {
|
||||
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
Log.d(Logging.LOG_TAG, this + " startLoading parent=" + parentMailboxId
|
||||
+ " highlighted=" + highlightedMailboxId);
|
||||
|
@ -824,9 +819,8 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
// We want to make visible the selection only for the first load.
|
||||
// Re-load caused by content changed events shouldn't scroll the list.
|
||||
if (!updateHighlightedMailbox(mIsFirstLoad)) {
|
||||
|
||||
// TODO We should just select the parent mailbox, or Inbox if it's already
|
||||
// top-level. Make sure to call onMailboxSelected().
|
||||
// This may happen if the mailbox to be selected is not actually in the list
|
||||
// that was loaded. Let the user just pick one manually if needed.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -581,16 +581,6 @@ abstract class UIControllerBase implements MailboxListFragment.Callback,
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: remove this when the search mailbox no longer shows up on the list
|
||||
// Special case search. Since the search mailbox shows up in the mailbox list, the mailbox
|
||||
// list can give us a callback to open that mailbox, and it will look like a normal
|
||||
// mailbox open instead of a search, blowing away a perfectly good list context.
|
||||
if (mListContext != null
|
||||
&& mListContext.isSearch()
|
||||
&& mListContext.getMailboxId() == listContext.getMailboxId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Email.DEBUG && Logging.DEBUG_LIFECYCLE) {
|
||||
Log.i(Logging.LOG_TAG, this + " setListContext: " + listContext);
|
||||
}
|
||||
|
|
|
@ -391,8 +391,9 @@ class UIControllerTwoPane extends UIControllerBase implements ThreePaneLayout.Ca
|
|||
long mailboxId = mListContext.getMailboxId();
|
||||
if ((getUIAccountId() != accountId) || (getMailboxListMailboxId() != mailboxId)) {
|
||||
removeMailboxListFragment(ft);
|
||||
boolean enableHighlight = !mListContext.isSearch();
|
||||
ft.add(mThreePane.getLeftPaneId(),
|
||||
MailboxListFragment.newInstance(accountId, mailboxId, true));
|
||||
MailboxListFragment.newInstance(accountId, mailboxId, enableHighlight));
|
||||
}
|
||||
if (clearDependentPane) {
|
||||
removeMessageListFragment(ft);
|
||||
|
|
Loading…
Reference in New Issue