Fix updating of items in SearchRecyclerViewAdapter
This commit is contained in:
parent
aaefc00f3b
commit
d445faff60
1 changed files with 2 additions and 3 deletions
|
@ -89,9 +89,8 @@ public class SearchRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItems(@Nullable List<WikivoyageSearchResult> items) {
|
public void setItems(@Nullable List<WikivoyageSearchResult> items) {
|
||||||
if (items == null || items.isEmpty()) {
|
this.items.clear();
|
||||||
this.items.clear();
|
if (items != null && !items.isEmpty()) {
|
||||||
} else {
|
|
||||||
this.items.add(app.getString(R.string.shared_string_result));
|
this.items.add(app.getString(R.string.shared_string_result));
|
||||||
this.items.addAll(items);
|
this.items.addAll(items);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue