You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Strip out most StaggeredGridLayoutManager in code
This commit is contained in:
@@ -54,8 +54,8 @@ class EndlessRecyclerScrollListener(
|
||||
|
||||
val visibleItemPosition = if (direction == Direction.BOTTOM) {
|
||||
when (layoutManager) {
|
||||
is StaggeredGridLayoutManager -> layoutManager.findLastVisibleItemPositions(null).max()
|
||||
?: 0
|
||||
is StaggeredGridLayoutManager ->
|
||||
layoutManager.findLastVisibleItemPositions(null).max() ?: 0
|
||||
is GridLayoutManager -> layoutManager.findLastVisibleItemPosition()
|
||||
is LinearLayoutManager -> layoutManager.findLastVisibleItemPosition()
|
||||
else -> throw IllegalArgumentException("Only LinearLayoutManager, GridLayoutManager and StaggeredGridLayoutManager are supported")
|
||||
@@ -113,4 +113,4 @@ class EndlessRecyclerScrollListener(
|
||||
}
|
||||
|
||||
class ResetState : ViewEvent()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user