fix: use <= in firstVisibleRowIndex binary search to skip zero-height rows at viewport edge
When rowEnd exactly equals absoluteY, the row's bottom edge touches but does not overlap the viewport, so it should not be considered visible. Change strict < to <= to correctly skip such rows.
This commit is contained in:
1 file changed
+1
-1
@@ -1150,7 +1150,7 @@ private final class ReviewDiffContentView: UIView, UIGestureRecognizerDelegate {
|
||||
let midpoint = (lowerBound + upperBound) / 2
|
||||
let rowEnd = rowOffsets[midpoint] + height(for: rows[midpoint])
|
||||
|
||||
if rowEnd < absoluteY {
|
||||
if rowEnd <= absoluteY {
|
||||
lowerBound = midpoint + 1
|
||||
} else {
|
||||
upperBound = midpoint
|
||||
|
||||
Reference in new issue
Block a user