Remove unnecessary parameter "lastTask"

This commit is contained in:
Alexander Sytnyk 2018-03-28 19:03:41 +03:00
parent 927ed3c58f
commit ad47daaadc
2 changed files with 4 additions and 6 deletions

View file

@ -138,11 +138,9 @@ public class WikivoyageSearchDialogFragment extends BaseOsmAndDialogFragment imp
} }
@Override @Override
public void onSearchFinished(@Nullable List<SearchResult> results, boolean lastTask) { public void onSearchFinished(@Nullable List<SearchResult> results) {
adapter.setItems(results); adapter.setItems(results);
if (lastTask) { switchProgressBarVisibility(false);
switchProgressBarVisibility(false);
}
} }
private void switchProgressBarVisibility(boolean show) { private void switchProgressBarVisibility(boolean show) {

View file

@ -55,7 +55,7 @@ public class WikivoyageSearchHelper {
void onSearchStarted(); void onSearchStarted();
void onSearchFinished(@Nullable List<SearchResult> results, boolean lastTask); void onSearchFinished(@Nullable List<SearchResult> results);
} }
private class SearchAsyncTask extends AsyncTask<Void, Void, List<SearchResult>> { private class SearchAsyncTask extends AsyncTask<Void, Void, List<SearchResult>> {
@ -95,7 +95,7 @@ public class WikivoyageSearchHelper {
protected void onPostExecute(List<SearchResult> results) { protected void onPostExecute(List<SearchResult> results) {
super.onPostExecute(results); super.onPostExecute(results);
for (SearchListener listener : listeners) { for (SearchListener listener : listeners) {
listener.onSearchFinished(results, workQueue.isEmpty()); listener.onSearchFinished(results);
} }
} }
} }