mirror of
https://github.com/null2264/yokai.git
synced 2025-07-16 22:06:54 +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) }
|
.mapNotNull { getChildAt(it) }
|
||||||
.filter {
|
.filter {
|
||||||
val isLibraryHeader = getItemViewType(it) == R.layout.library_category_header_item
|
val isLibraryHeader = getItemViewType(it) == R.layout.library_category_header_item
|
||||||
val bottom = (if (isLibraryHeader) {
|
val bottom = (
|
||||||
it.findViewById<TextView>(R.id.category_title)?.bottom?.plus(it.y)?.roundToInt()
|
if (isLibraryHeader) {
|
||||||
} else it.bottom) ?: it.bottom
|
it.findViewById<TextView>(R.id.category_title)?.bottom?.plus(it.y)?.roundToInt()
|
||||||
|
} else it.bottom
|
||||||
|
) ?: it.bottom
|
||||||
bottom >= inset + toolbarHeight && it.height > 0
|
bottom >= inset + toolbarHeight && it.height > 0
|
||||||
}
|
}
|
||||||
.mapNotNull { pos -> getPosition(pos).takeIf { it != RecyclerView.NO_POSITION } }
|
.mapNotNull { pos -> getPosition(pos).takeIf { it != RecyclerView.NO_POSITION } }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue