mirror of
https://github.com/ev-map/EVMap.git
synced 2026-04-19 05:38:07 -04:00
MapScreen: fix onItemVisibilityChanged if indices are -1
This commit is contained in:
@@ -413,6 +413,7 @@ class MapScreen(ctx: CarContext, val session: EVMapSession) :
|
||||
override fun onItemVisibilityChanged(startIndex: Int, endIndex: Int) {
|
||||
// when the list is scrolled, load corresponding availabilities
|
||||
if (startIndex == visibleStart && endIndex == visibleEnd) return
|
||||
if (startIndex == -1 || endIndex == -1) return
|
||||
if (availabilityUpdateCoroutine != null) return
|
||||
|
||||
visibleEnd = endIndex
|
||||
|
||||
Reference in New Issue
Block a user