Skip to content

Commit

Permalink
fix crash FastScrollRecyclerView#172
Browse files Browse the repository at this point in the history
  • Loading branch information
ekibun committed Mar 13, 2020
1 parent 93f00b1 commit c720414
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class FastScrollRecyclerView @JvmOverloads constructor(
} ?: adapter.itemCount)
if (itemHeightCache.size != itemCount)
itemHeightCache = IntArray(itemCount) { itemHeightCache.getOrNull(it) ?: 200 }

if (itemHeightCache.isEmpty()) return
if (layoutManager is LinearLayoutManager) {
val firstIndex = layoutManager.findFirstVisibleItemPosition()
val lastIndex = layoutManager.findLastVisibleItemPosition()
Expand Down

0 comments on commit c720414

Please sign in to comment.