mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-02 20:16:54 +01:00
Make the scrolling check more succinct and readable
This commit is contained in:
parent
a2dda5f0f8
commit
1e7ed5bf35
@ -196,11 +196,7 @@ class DetailViewController: UIViewController {
|
|||||||
let scrollToY: CGFloat = {
|
let scrollToY: CGFloat = {
|
||||||
let fullScroll = webView.scrollView.contentOffset.y + webView.scrollView.bounds.size.height
|
let fullScroll = webView.scrollView.contentOffset.y + webView.scrollView.bounds.size.height
|
||||||
let final = finalScrollPosition()
|
let final = finalScrollPosition()
|
||||||
if fullScroll < final {
|
return fullScroll < final ? fullScroll : final
|
||||||
return fullScroll
|
|
||||||
} else {
|
|
||||||
return final
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
let convertedPoint = self.view.convert(CGPoint(x: 0, y: 0), to: webView.scrollView)
|
let convertedPoint = self.view.convert(CGPoint(x: 0, y: 0), to: webView.scrollView)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user