Remove unnecessary parameter "lastTask"
This commit is contained in:
parent
927ed3c58f
commit
ad47daaadc
2 changed files with 4 additions and 6 deletions
|
@ -138,12 +138,10 @@ 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) {
|
||||||
progressBar.setVisibility(show ? View.VISIBLE : View.GONE);
|
progressBar.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue