Fix toolbars disappearing when tapping screen while scrolling

This commit is contained in:
Shadowfacts 2020-12-20 14:11:02 -05:00
parent f2b78d676f
commit 43b105c85e
1 changed files with 3 additions and 5 deletions

View File

@ -332,13 +332,11 @@ extension BrowserNavigationController: UIScrollViewDelegate {
guard trackingScroll else { return }
trackingScroll = false
let finalOffset: CGFloat
if velocity.y < 0 {
finalOffset = 0
} else {
finalOffset = 1
if velocity.y == 0 {
return
}
let finalOffset: CGFloat = velocity.y < 0 ? 0 : 1
UIView.animate(withDuration: 0.15, delay: 0, options: .curveEaseOut) {
self.toolbarOffset = finalOffset
}