Reload indexes properly

This commit is contained in:
Victor Shcherb 2012-01-19 00:18:36 +01:00
parent 6c7fdd1b72
commit 199220d5e5

View file

@ -392,8 +392,6 @@ public class LocalIndexesActivity extends ExpandableListActivity {
findViewById(R.id.ProgressBar).setVisibility(View.GONE); findViewById(R.id.ProgressBar).setVisibility(View.GONE);
Toast.makeText(LocalIndexesActivity.this, result, Toast.LENGTH_LONG).show(); Toast.makeText(LocalIndexesActivity.this, result, Toast.LENGTH_LONG).show();
listAdapter.clear(); listAdapter.clear();
asyncLoader = new LoadLocalIndexTask();
asyncLoader.execute(LocalIndexesActivity.this);
reloadIndexes(); reloadIndexes();
} }
@ -686,6 +684,8 @@ public class LocalIndexesActivity extends ExpandableListActivity {
public void reloadIndexes() { public void reloadIndexes() {
listAdapter.clear();
asyncLoader = new LoadLocalIndexTask();
AsyncTask<Void, String, List<String>> task = new AsyncTask<Void, String, List<String>>(){ AsyncTask<Void, String, List<String>> task = new AsyncTask<Void, String, List<String>>(){
@Override @Override
@ -704,6 +704,7 @@ public class LocalIndexesActivity extends ExpandableListActivity {
} }
Toast.makeText(LocalIndexesActivity.this, b.toString(), Toast.LENGTH_LONG).show(); Toast.makeText(LocalIndexesActivity.this, b.toString(), Toast.LENGTH_LONG).show();
} }
asyncLoader.execute(LocalIndexesActivity.this);
} }
@Override @Override