Account for momentum when hiding minimal shell (#3740)

* Add optional momentum events to scroll context

* If there is a velocity, don't snap until momentum end

* Don't show bar on scroll down

* Rm onMomentumBegin
This commit is contained in:
dan 2024-04-28 17:48:20 +01:00 committed by GitHub
parent 3b4848ba59
commit 1dd3d6657c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 59 additions and 15 deletions

View file

@ -64,6 +64,11 @@ function ListImpl<ItemT>(
}
}
},
// Note: adding onMomentumBegin here makes simulator scroll
// lag on Android. So either don't add it, or figure out why.
onMomentumEnd(e, ctx) {
contextScrollHandlers.onMomentumEnd?.(e, ctx)
},
})
let refreshControl