mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Crash fix
This commit is contained in:
parent
876831480a
commit
6cf84256fe
1 changed files with 3 additions and 3 deletions
|
@ -85,9 +85,9 @@ class WebtoonReader : BaseReader() {
|
|||
recycler.adapter = adapter
|
||||
recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
|
||||
val page = layoutManager.findLastVisibleItemPosition()
|
||||
if (page != currentPage) {
|
||||
onPageChanged(page)
|
||||
val index = layoutManager.findLastVisibleItemPosition()
|
||||
if (index != currentPage) {
|
||||
pages.getOrNull(index)?.let { onPageChanged(index) }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue