mirror of
https://github.com/afollestad/nock-nock.git
synced 2025-08-05 15:48:37 +00:00
Began basic local storage logic of sites
This commit is contained in:
parent
b2a6a46c62
commit
c508c36930
1 changed files with 4 additions and 0 deletions
|
@ -65,6 +65,10 @@ public class ServerAdapter extends RecyclerView.Adapter<ServerAdapter.ServerVH>
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set(ServerModel[] models) {
|
public void set(ServerModel[] models) {
|
||||||
|
if (models == null || models.length == 0) {
|
||||||
|
mServers.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
mServers = new ArrayList<>(models.length);
|
mServers = new ArrayList<>(models.length);
|
||||||
Collections.addAll(mServers, models);
|
Collections.addAll(mServers, models);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue