Don't call MessageListFragment methods until initialization is complete
This commit is contained in:
parent
74bbbe7ea5
commit
0cd7eb12ed
2 changed files with 6 additions and 2 deletions
|
@ -978,7 +978,8 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
|||
menu.findItem(R.id.search).setVisible(false);
|
||||
menu.findItem(R.id.search_remote).setVisible(false);
|
||||
|
||||
if (mDisplayMode == DisplayMode.MESSAGE_VIEW || mMessageListFragment == null) {
|
||||
if (mDisplayMode == DisplayMode.MESSAGE_VIEW || mMessageListFragment == null ||
|
||||
!mMessageListFragment.isInitialized()) {
|
||||
menu.findItem(R.id.check_mail).setVisible(false);
|
||||
menu.findItem(R.id.set_sort).setVisible(false);
|
||||
menu.findItem(R.id.select_all).setVisible(false);
|
||||
|
|
|
@ -920,7 +920,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
updateFooterView();
|
||||
}
|
||||
|
||||
mController = MessagingController.getInstance(getActivity().getApplication());
|
||||
mListView.setAdapter(mAdapter);
|
||||
}
|
||||
|
||||
|
@ -3349,4 +3348,8 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
public boolean isSingleFolderMode() {
|
||||
return mSingleFolderMode;
|
||||
}
|
||||
|
||||
public boolean isInitialized() {
|
||||
return mInitialized;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue