From ad47daaadccf3dc1929ad2ee7037ff34c5eaf1ca Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Wed, 28 Mar 2018 19:03:41 +0300 Subject: [PATCH] Remove unnecessary parameter "lastTask" --- .../wikivoyage/search/WikivoyageSearchDialogFragment.java | 6 ++---- .../plus/wikivoyage/search/WikivoyageSearchHelper.java | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java index e636969006..4dba5c200f 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java @@ -138,11 +138,9 @@ public class WikivoyageSearchDialogFragment extends BaseOsmAndDialogFragment imp } @Override - public void onSearchFinished(@Nullable List results, boolean lastTask) { + public void onSearchFinished(@Nullable List results) { adapter.setItems(results); - if (lastTask) { - switchProgressBarVisibility(false); - } + switchProgressBarVisibility(false); } private void switchProgressBarVisibility(boolean show) { diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchHelper.java index 730d0de23a..7b61659ff7 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchHelper.java @@ -55,7 +55,7 @@ public class WikivoyageSearchHelper { void onSearchStarted(); - void onSearchFinished(@Nullable List results, boolean lastTask); + void onSearchFinished(@Nullable List results); } private class SearchAsyncTask extends AsyncTask> { @@ -95,7 +95,7 @@ public class WikivoyageSearchHelper { protected void onPostExecute(List results) { super.onPostExecute(results); for (SearchListener listener : listeners) { - listener.onSearchFinished(results, workQueue.isEmpty()); + listener.onSearchFinished(results); } } }