Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.4 连续两次调用setNewInstance() 第二次无效,数据没有变化 #3309

Open
Ybingbing opened this issue Aug 24, 2020 · 4 comments

Comments

@Ybingbing
Copy link

Ybingbing commented Aug 24, 2020

No description provided.

@xuehuashi
Copy link

同样问题,使用setList(),可以解决。但2个方法差别不大,不知道啥原因,注释只是说通常情况使用setlist()

@hegaojian
Copy link

我也碰到这个问题了,第二次设置setNewInstance()时无效,数据一直没变化,刚刚试了 setList()就OK了,感谢楼上,好人一胎八个儿子,这个bug折腾了我许久,一直以为是自己写的有问题,各种debug找半天

@protectedMan
Copy link

image
你看下源码描述, 1151行到1153行 ,如果两个集合内存地址一样就不会进行更新,所以正如注释所描述的,如果需要更新数据,调用com.chad.library.adapter.base.BaseQuickAdapter#setList更合适

@Limppawn
Copy link

Limppawn commented Aug 8, 2023

很好的解决了我的问题,找的就是这个

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants