From 89c72449d230fa4348b964ec66f030ddde8d435e Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 17 Nov 2014 16:07:09 +0200 Subject: [PATCH] Fixed: removing last item in category does not remove category --- OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index ca7cb3f416..991cfa7ab7 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -806,6 +806,10 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { LocalIndexInfo c = findCategory(i, i.isBackupedData()); if(c != null){ data.get(c).remove(i); + if (data.get(c).size() == 0){ + data.remove(c); + category.remove(c); + } } } listAdapter.notifyDataSetChanged();