fix doInBackground

This commit is contained in:
Chumva 2018-04-25 19:10:23 +03:00
parent be9d2fdecd
commit bdd3d42c74

View file

@ -64,7 +64,7 @@ public class ExploreTabFragment extends BaseOsmAndFragment {
popularDestinationsSearchTask.execute(); popularDestinationsSearchTask.execute();
} }
private static class PopularDestinationsSearchTask extends AsyncTask<ExploreRvAdapter, TravelDbHelper, List<TravelArticle>> { private static class PopularDestinationsSearchTask extends AsyncTask<Void, TravelDbHelper, List<TravelArticle>> {
private TravelDbHelper travelDbHelper; private TravelDbHelper travelDbHelper;
private WeakReference<OsmandActionBarActivity> weakContext; private WeakReference<OsmandActionBarActivity> weakContext;
@ -84,14 +84,14 @@ public class ExploreTabFragment extends BaseOsmAndFragment {
} }
@Override @Override
protected void onPreExecute() { protected List<TravelArticle> doInBackground(Void... voids) {
super.onPreExecute(); return travelDbHelper.searchPopular();
weakProgressBar.get().setVisibility(View.VISIBLE);
} }
@Override @Override
protected List<TravelArticle> doInBackground(ExploreRvAdapter... exploreRvAdapters) { protected void onPreExecute() {
return travelDbHelper.searchPopular(); super.onPreExecute();
weakProgressBar.get().setVisibility(View.VISIBLE);
} }
@Override @Override