From d06e883dd1bbc39e836c32b3394171c300d1edaf Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 17 Nov 2014 14:30:15 +0200 Subject: [PATCH] Fixed bug when after deleting something in localindex - adapter was recreated and all open categories was closed --- .../src/net/osmand/plus/download/LocalIndexesFragment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index 3fdf67f2bc..ca7cb3f416 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -388,9 +388,10 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { protected void onPostExecute(String result) { getDownloadActivity().setProgressBarIndeterminateVisibility(false); AccessibleToast.makeText(getDownloadActivity(), result, Toast.LENGTH_LONG).show(); - listAdapter.clear(); - reloadIndexes(); - + if (operation == RESTORE_OPERATION){ + listAdapter.clear(); + reloadIndexes(); + } } }