Skip to content
Permalink
Browse files

Fix header being elevated for pos 0

  • Loading branch information...
chrisbanes committed Apr 15, 2019
1 parent f9d7371 commit ff1b97683dc9dff91464419a262dafc789907d8d
Showing with 9 additions and 1 deletion.
  1. +9 −1 app/src/main/java/app/tivi/ui/epoxy/StickyHeaderScrollListener.kt
@@ -62,7 +62,15 @@ class StickyHeaderScrollListener(
return
}

currentHeaderItemPosition = getHeaderPositionForItem(topChildPosition)
val headerPositionForChild = getHeaderPositionForItem(topChildPosition)
currentHeaderItemPosition = when {
headerPositionForChild == 0 && topChildPosition == 0 && topChild.top >= 0 -> {
RecyclerView.NO_POSITION
}
else -> {
headerPositionForChild
}
}

if (currentHeaderItemPosition != RecyclerView.NO_POSITION) {
val childInContact = getChildInContact(parent, currentHeaderHeight, currentHeaderItemPosition)

0 comments on commit ff1b976

Please sign in to comment.
You can’t perform that action at this time.