revert to deactivate-code temporary fix

This commit is contained in:
sonora 2014-12-21 11:53:29 +01:00
parent 59e206463c
commit e7d7a99ad0

View file

@ -478,18 +478,15 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (this.isDetached()) {
return;
}
//fixes issue when local files not shown after switching tabs
//TODO: But this throws NPE in some circumstances and needs fixing, so commented out for now
if (listAdapter.getGroupCount() == 0 && getDownloadActivity().getLocalIndexInfos().size() > 0) {
for(LocalIndexInfo info : getDownloadActivity().getLocalIndexInfos()) {
listAdapter.addLocalIndexInfo(info);
}
listAdapter.sortData();
getExpandableListView().setAdapter(listAdapter);
}
//TODO: But next line throws NPE in some circumstances when called from dashboard, so needs fixing, commented out for now
//if (listAdapter.getGroupCount() == 0 && getDownloadActivity().getLocalIndexInfos().size() > 0) {
// for(LocalIndexInfo info : getDownloadActivity().getLocalIndexInfos()) {
// listAdapter.addLocalIndexInfo(info);
// }
// listAdapter.sortData();
// getExpandableListView().setAdapter(listAdapter);
//}
ActionBar actionBar = getDownloadActivity().getSupportActionBar();
//hide action bar from downloadindexfragment
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);