mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
Fix scroll_to_item_id action in pager with infinite scroll
commit_hash:41636779cfd9a6ea1a6d227ba258964ac20e3872
This commit is contained in:
+2
-1
@@ -182,7 +182,8 @@ internal sealed class DivViewWithItems {
|
||||
|
||||
override fun getIndicesOfItemWithId(id: String): List<Int> {
|
||||
val adapter = view.viewPager.adapter as? DivPagerAdapter ?: return emptyList()
|
||||
return adapter.itemsToShow.getIndicesWithId(id) { div }
|
||||
return adapter.visibleItems.getIndicesWithId(id) { div }
|
||||
.map { adapter.getPosition(it) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user