Fixed recyclerview header not colliding in some special case

This commit is contained in:
Sylvain Berfini 2024-01-25 18:08:57 +01:00
parent 9fc6a1eb57
commit 98a3c89435

View file

@ -104,7 +104,7 @@ class RecyclerViewHeaderDecoration(
var latestPositionHeaderFound = -1
var nextHeaderTopPosition = -1f
for (index in parent.childCount downTo 0) {
for (index in parent.childCount downTo 1) { // Ignore top/first item
val child = parent.getChildAt(index)
val position = parent.getChildAdapterPosition(child)
if (position != RecyclerView.NO_POSITION && adapter.displayHeaderForPosition(position)) {