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

rax-scrollview resetScroll导致向上滚动也会触发onEndReached #383

Open
clumiere opened this issue Jul 26, 2021 · 2 comments
Open

Comments

@clumiere
Copy link
Contributor

如果onEndReached异步请求失败,需要重置状态,使得可以再次向下滚动触发onEndReached,resetScroll中直接lastScrollDistance重置为0,导致第一次往上滚动也会触发onEndReached了

@clumiere
Copy link
Contributor Author

lastScrollDistance不需要重置为0

@fyangstudio
Copy link
Contributor

onEndReached 个人直觉也是不应该加锁,滑动到底就触发。

scrollview 作为基础组件,绝大部分活动页面都有用到它。可能是兼容了某些场景和历史问题导致现在的设计,也维持了一段时间,需要统计下影响面,再做决策。

针对上文场景,建议再最下层 插入一个 1px 的 view,监听这个 view 的 appear 事件,去判断触底

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