From e7d7a99ad06a2834dccb512b43b7cfb84d0dd82b Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 21 Dec 2014 11:53:29 +0100 Subject: [PATCH] revert to deactivate-code temporary fix --- .../plus/download/LocalIndexesFragment.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index fcf37b8cf9..56db5b8fc0 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -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);