mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 02:59:07 +01:00
Update WebtoonViewer.kt
This commit is contained in:
parent
504a10a6eb
commit
109a61e567
@ -66,8 +66,8 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
recycler.itemAnimator = null
|
recycler.itemAnimator = null
|
||||||
recycler.layoutManager = layoutManager
|
recycler.layoutManager = layoutManager
|
||||||
recycler.adapter = adapter
|
recycler.adapter = adapter
|
||||||
recycler.addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() {
|
recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
override fun onScrolled(recyclerView: androidx.recyclerview.widget.RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
val position = layoutManager.findLastEndVisibleItemPosition()
|
val position = layoutManager.findLastEndVisibleItemPosition()
|
||||||
val item = adapter.items.getOrNull(position)
|
val item = adapter.items.getOrNull(position)
|
||||||
if (item != null && currentPage != item) {
|
if (item != null && currentPage != item) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user