Locations: reduce polls (#1560)

* .take(3).timeout(1.minutes)

* debounce location search by 250ms to reduce location queries

* reduce timeout to 30 seconds

* keep code and comments in sync ...

* Move empty query condition check back to LocationsRepository

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
This commit is contained in:
shtrophic
2025-08-31 20:43:29 +02:00
committed by GitHub
parent 2668cf8afc
commit 55365fbc59
2 changed files with 18 additions and 9 deletions

View File

@@ -235,6 +235,7 @@ internal class SearchServiceImpl(
}
if (filters.places) {
launch {
delay(250)
locationRepository.search(query, filters.allowNetwork)
.combine(customAttrResults) { locations, customAttrs ->
if (customAttrs.locations != null) locations + customAttrs.locations