1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Don't call MessageListFragment methods until initialization is complete

This commit is contained in:
cketti 2013-02-06 18:11:29 +01:00
parent 74bbbe7ea5
commit 0cd7eb12ed
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}
}