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

数据源更新,页面刷新修改cell类型时显示不正常问题 #39

Open
Penn-xy opened this issue Sep 6, 2022 · 1 comment
Open

Comments

@Penn-xy
Copy link

Penn-xy commented Sep 6, 2022

当数据源改动,页面更新,重新设置cell类型时,当前page会显示之前的cell,滑动后才会恢复正常显示。
例如当前page显示视频,刷新后当前page应该为图片,但实质刷新后还是在展示视频。
调用resetCells可以重置cell位置,但里面跳过了当前的pageIndex,visibleCells清空后,之前应该修改类型的cell没有添加上去,

            if index == pageIndex {
//                continue
            }
            if index == pageIndex && visibleCells[index] != nil {
//                continue
            }

将这两处的continue注释掉可以解决此问题,但不知道这两行的具体作用,不知道会不会导致其他问题。
希望作者可以协助解答 ~ 感谢

@nameIsYong
Copy link

遇到类似问题,当数据源发生变化(删除正在显示的图片)并调用Lantern 的 reloadData()后页面并不会引起UI变化。
我认为reloadData里面的刷新逻辑还有点问题。希望作者可以解决该问题。

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

2 participants