Fix scroll_to_item_id action in pager with infinite scroll

commit_hash:41636779cfd9a6ea1a6d227ba258964ac20e3872
This commit is contained in:
grechka62
2026-04-24 11:27:35 +03:00
parent 4df0a4ceea
commit 37c68613b3
@@ -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) }
}
}