Skip to content

Bugfix/pull to refresh#1670

Open
EvangelosG wants to merge 4 commits intoandroid:mainfrom
EvangelosG:bugfix/pull-to-refresh
Open

Bugfix/pull to refresh#1670
EvangelosG wants to merge 4 commits intoandroid:mainfrom
EvangelosG:bugfix/pull-to-refresh

Conversation

@EvangelosG
Copy link
Copy Markdown

Fix pull-to-refresh activating from continuous scroll-to-top gesture in JetNews app.

PullToRefreshBox triggers on any overscroll with NestedScrollSource.UserInput,
which means dragging from the bottom of the list to the top in a single gesture
incorrectly activates refresh once the list hits its top bound.

Add a NestedScrollConnection above PullToRefreshBox that tracks whether the
child consumed any downward scroll during the current gesture. If it did, the
gesture started mid-list, so overscroll is consumed to prevent PullToRefreshBox
from seeing it. The flag resets on fling (finger lift) so the next fresh
pull-down from the top still works normally.

Loading
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

Successfully merging this pull request may close these issues.

2 participants