Fix updating of items in SearchRecyclerViewAdapter

This commit is contained in:
Alex Sytnyk 2018-04-02 17:06:27 +03:00
parent aaefc00f3b
commit d445faff60

View file

@ -89,9 +89,8 @@ public class SearchRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView
}
public void setItems(@Nullable List<WikivoyageSearchResult> 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);
}