mirror of
https://github.com/ev-map/EVMap.git
synced 2026-05-24 23:06:15 -04:00
fix unnecessary empty requests to fronyx API
This commit is contained in:
@@ -250,6 +250,10 @@ class MapViewModel(application: Application, private val state: SavedStateHandle
|
||||
).any { filtered.contains(it) }
|
||||
} ?: true
|
||||
}.flatMap { it.value }
|
||||
if (allEvseIds.isEmpty()) {
|
||||
emit(Resource.success(emptyList()))
|
||||
return@liveData
|
||||
}
|
||||
try {
|
||||
val result = predictionApi.getPredictionsForEvseIds(allEvseIds)
|
||||
if (result.size == allEvseIds.size) {
|
||||
|
||||
Reference in New Issue
Block a user