mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fixes to format of LinearLayoutManagerAccurateOffset
This commit is contained in:
parent
7c8a10c651
commit
5138fc1a49
1 changed files with 5 additions and 3 deletions
|
@ -104,9 +104,11 @@ fun RecyclerView.LayoutManager.getFirstPos(recyclerView: RecyclerView?, toolbarH
|
|||
.mapNotNull { getChildAt(it) }
|
||||
.filter {
|
||||
val isLibraryHeader = getItemViewType(it) == R.layout.library_category_header_item
|
||||
val bottom = (if (isLibraryHeader) {
|
||||
it.findViewById<TextView>(R.id.category_title)?.bottom?.plus(it.y)?.roundToInt()
|
||||
} else it.bottom) ?: it.bottom
|
||||
val bottom = (
|
||||
if (isLibraryHeader) {
|
||||
it.findViewById<TextView>(R.id.category_title)?.bottom?.plus(it.y)?.roundToInt()
|
||||
} else it.bottom
|
||||
) ?: it.bottom
|
||||
bottom >= inset + toolbarHeight && it.height > 0
|
||||
}
|
||||
.mapNotNull { pos -> getPosition(pos).takeIf { it != RecyclerView.NO_POSITION } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue