mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Show controls when hitting bottom of reader
This commit is contained in:
parent
0529792f2a
commit
421de02969
1 changed files with 6 additions and 0 deletions
|
|
@ -121,6 +121,12 @@ extension WebReaderCoordinator: WKNavigationDelegate {
|
|||
scrollView.contentInset.top = navBarVisible ? readerViewNavBarHeight : 0
|
||||
}
|
||||
|
||||
// if at bottom show the controls
|
||||
if yOffset + scrollView.visibleSize.height > scrollView.contentSize.height - 140 {
|
||||
navBarVisible = true
|
||||
scrollView.contentInset.top = navBarVisible ? readerViewNavBarHeight : 0
|
||||
}
|
||||
|
||||
let percent = Int(((yOffset + scrollView.visibleSize.height) / scrollView.contentSize.height) * 100)
|
||||
scrollPercentHandler(max(0, min(percent, 100)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue