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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user