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

并发修改异常 #1556

Open
prettygirl20231 opened this issue Jan 19, 2024 · 0 comments
Open

并发修改异常 #1556

prettygirl20231 opened this issue Jan 19, 2024 · 0 comments

Comments

@prettygirl20231
Copy link

if (viewModel.isRefresh) {
logListAdapter.submitList(it.subList(1, it.size))
} else {
logListAdapter.addAll(it.subList(viewModel.addSize, it.size))
}
我写了一段这个代码,在使用不同的方法更新数据源,但是当我下拉刷新后logListAdapter.submitList(it.subList(1, it.size))在调用上拉加载logListAdapter.addAll(it.subList(viewModel.addSize, it.size))。会出现数组的并发修改异常

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

1 participant