mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/20992 - Speculative fix for TopSitesPagerAdapter crash
This commit is contained in:
parent
6f7d91efb1
commit
822775eb9d
@ -59,7 +59,10 @@ class TopSitesPagerAdapter(
|
||||
|
||||
// Update new list with the changed items
|
||||
currentPageChangedItems.forEach { item ->
|
||||
refreshedItems[item.first - (position * TOP_SITES_PER_PAGE)] = item.second
|
||||
val index = item.first - (position * TOP_SITES_PER_PAGE)
|
||||
if (index in refreshedItems.indices) {
|
||||
refreshedItems[index] = item.second
|
||||
}
|
||||
}
|
||||
|
||||
// Display the updated list without any of the removed items
|
||||
|
Loading…
Reference in New Issue
Block a user