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:
parent
74bbbe7ea5
commit
0cd7eb12ed
@ -978,7 +978,8 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
|||||||
menu.findItem(R.id.search).setVisible(false);
|
menu.findItem(R.id.search).setVisible(false);
|
||||||
menu.findItem(R.id.search_remote).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.check_mail).setVisible(false);
|
||||||
menu.findItem(R.id.set_sort).setVisible(false);
|
menu.findItem(R.id.set_sort).setVisible(false);
|
||||||
menu.findItem(R.id.select_all).setVisible(false);
|
menu.findItem(R.id.select_all).setVisible(false);
|
||||||
|
@ -920,7 +920,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||||||
updateFooterView();
|
updateFooterView();
|
||||||
}
|
}
|
||||||
|
|
||||||
mController = MessagingController.getInstance(getActivity().getApplication());
|
|
||||||
mListView.setAdapter(mAdapter);
|
mListView.setAdapter(mAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3349,4 +3348,8 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||||||
public boolean isSingleFolderMode() {
|
public boolean isSingleFolderMode() {
|
||||||
return mSingleFolderMode;
|
return mSingleFolderMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isInitialized() {
|
||||||
|
return mInitialized;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user