Skip to content

Commit 6a1cfd5

Browse files
committed
reachedBottom: remove [base] capture group
1 parent 30d94d8 commit 6a1cfd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/RxCocoa/UIScrollView+reachedBottom.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public extension Reactive where Base: UIScrollView {
1717
- returns: ControlEvent that emits when the bottom of the base UIScrollView is reached.
1818
*/
1919
func reachedBottom(offset: CGFloat = 0.0) -> ControlEvent<Void> {
20-
let source = contentOffset.map { [base] contentOffset in
21-
let visibleHeight = base.frame.height - base.contentInset.top - base.contentInset.bottom
22-
let y = contentOffset.y + base.contentInset.top
23-
let threshold = max(offset, base.contentSize.height - visibleHeight)
20+
let source = contentOffset.map { contentOffset in
21+
let visibleHeight = self.base.frame.height - self.base.contentInset.top - self.base.contentInset.bottom
22+
let y = contentOffset.y + self.base.contentInset.top
23+
let threshold = max(offset, self.base.contentSize.height - visibleHeight)
2424
return y >= threshold
2525
}
2626
.distinctUntilChanged()

0 commit comments

Comments
 (0)