Crash fix
This commit is contained in:
parent
876831480a
commit
6cf84256fe
@ -85,9 +85,9 @@ class WebtoonReader : BaseReader() {
|
|||||||
recycler.adapter = adapter
|
recycler.adapter = adapter
|
||||||
recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
|
||||||
val page = layoutManager.findLastVisibleItemPosition()
|
val index = layoutManager.findLastVisibleItemPosition()
|
||||||
if (page != currentPage) {
|
if (index != currentPage) {
|
||||||
onPageChanged(page)
|
pages.getOrNull(index)?.let { onPageChanged(index) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user