From d445faff602c91d76e6eb82da73f8b3a17a5fdbe Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Mon, 2 Apr 2018 17:06:27 +0300 Subject: [PATCH] Fix updating of items in SearchRecyclerViewAdapter --- .../plus/wikivoyage/search/SearchRecyclerViewAdapter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java index 4972ef35c8..b2a9dc7ab2 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java @@ -89,9 +89,8 @@ public class SearchRecyclerViewAdapter extends RecyclerView.Adapter items) { - if (items == null || items.isEmpty()) { - this.items.clear(); - } else { + this.items.clear(); + if (items != null && !items.isEmpty()) { this.items.add(app.getString(R.string.shared_string_result)); this.items.addAll(items); }