try checking fot info=null
This commit is contained in:
parent
e7d7a99ad0
commit
16cc6c7298
1 changed files with 9 additions and 7 deletions
|
@ -480,13 +480,15 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
//fixes issue when local files not shown after switching tabs
|
//fixes issue when local files not shown after switching tabs
|
||||||
//TODO: But next line throws NPE in some circumstances when called from dashboard, so needs fixing, commented out for now
|
//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) {
|
if (listAdapter.getGroupCount() == 0 && getDownloadActivity().getLocalIndexInfos().size() > 0) {
|
||||||
// for(LocalIndexInfo info : getDownloadActivity().getLocalIndexInfos()) {
|
for(LocalIndexInfo info : getDownloadActivity().getLocalIndexInfos()) {
|
||||||
// listAdapter.addLocalIndexInfo(info);
|
if (info != null) {
|
||||||
// }
|
listAdapter.addLocalIndexInfo(info);
|
||||||
// listAdapter.sortData();
|
}
|
||||||
// getExpandableListView().setAdapter(listAdapter);
|
}
|
||||||
//}
|
listAdapter.sortData();
|
||||||
|
getExpandableListView().setAdapter(listAdapter);
|
||||||
|
}
|
||||||
ActionBar actionBar = getDownloadActivity().getSupportActionBar();
|
ActionBar actionBar = getDownloadActivity().getSupportActionBar();
|
||||||
//hide action bar from downloadindexfragment
|
//hide action bar from downloadindexfragment
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||||
|
|
Loading…
Reference in a new issue