Fix update color

This commit is contained in:
Victor Shcherb 2012-02-10 00:12:44 +01:00
parent 776d6dda80
commit 8e80767537

View file

@ -148,9 +148,7 @@ public class DownloadIndexActivity extends ExpandableListActivity {
});
indexFileNames = ((OsmandApplication)getApplication()).getResourceManager().getIndexFileNames();
((OsmandApplication)getApplication()).getResourceManager().getBackupIndexes(indexFileNames);
updateLoadedFiles();
filterText = (EditText) findViewById(R.id.search_box);
textWatcher = new TextWatcher() {
@ -193,6 +191,12 @@ public class DownloadIndexActivity extends ExpandableListActivity {
msg.show();
}
}
private void updateLoadedFiles() {
indexFileNames = ((OsmandApplication)getApplication()).getResourceManager().getIndexFileNames();
((OsmandApplication)getApplication()).getResourceManager().getBackupIndexes(indexFileNames);
}
private void downloadIndexList() {
@ -645,6 +649,7 @@ public class DownloadIndexActivity extends ExpandableListActivity {
protected void onProgressUpdate(Object... values) {
for(Object o : values){
if(o instanceof DownloadEntry){
updateLoadedFiles();
((DownloadIndexAdapter) getExpandableListAdapter()).notifyDataSetInvalidated();
findViewById(R.id.DownloadButton).setVisibility(
entriesToDownload.isEmpty() ? View.GONE : View.VISIBLE);
@ -674,8 +679,10 @@ public class DownloadIndexActivity extends ExpandableListActivity {
if(mainView != null){
mainView.setKeepScreenOn(false);
}
updateLoadedFiles();
((DownloadIndexAdapter) getExpandableListAdapter()).notifyDataSetInvalidated();
tracker.dispatch();
}
@Override