84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
应该是怎样的处理逻辑?怎么能做到像今日头条那样,下拉刷新之后,添加一个上次阅读位置,然后旧的数据还都在下边?我现在做的是下拉刷新获得20条新数据并保存在一个数组中,然后将这个数组保存本地;然后上拉加载更多数据时,也将返回的数据添加到同一个数组中,这样没有网络的话就从缓存加载;但是有网的话,再次下拉刷新返回的数据就把之前数组中的都覆盖了,这样导致再次上拉加载的时候就得重新加载了接口是从网上找的,也没法判断新旧
光阴似箭催人老,日月如移越少年。
According to your idea, wouldn’t it be ok to use two arrays? Just compare it after reloading and it will be ok
According to your idea, wouldn’t it be ok to use two arrays? Just compare it after reloading and it will be ok