This commit is contained in:
Victor Shcherb 2014-11-05 22:01:27 +01:00
parent fa7ce94c64
commit 94ac2a5907

View file

@ -71,6 +71,16 @@ public class DownloadActivity extends SherlockFragmentActivity {
setProgressBarIndeterminateVisibility(false);
setContentView(R.layout.tab_content);
if(downloadListIndexThread == null) {
downloadListIndexThread = new DownloadIndexesThread(this);
}
if (downloadListIndexThread.getCachedIndexFiles() != null && downloadListIndexThread.isDownloadedFromInternet()) {
downloadListIndexThread.runCategorization(type);
} else {
downloadListIndexThread.runReloadIndexFiles();
}
downloadListIndexThread.setUiActivity(this);
settings = ((OsmandApplication) getApplication()).getSettings();
tabHost = (TabHost) findViewById(android.R.id.tabhost);
tabHost.setup();
@ -90,15 +100,6 @@ public class DownloadActivity extends SherlockFragmentActivity {
tabHost.setCurrentTab(0);
if(downloadListIndexThread == null) {
downloadListIndexThread = new DownloadIndexesThread(this);
}
if (downloadListIndexThread.getCachedIndexFiles() != null && downloadListIndexThread.isDownloadedFromInternet()) {
downloadListIndexThread.runCategorization(type);
} else {
downloadListIndexThread.runReloadIndexFiles();
}
downloadListIndexThread.setUiActivity(this);
settings = ((OsmandApplication)getApplication()).getSettings();