[mob][photos] Fix infinite loading on searching (#1830)
## Description Search was infinitely loading even after all search results are ready.
This commit is contained in:
parent
31dee1249d
commit
30a8691c7f
1 changed files with 4 additions and 3 deletions
|
@ -203,7 +203,7 @@ class SearchWidgetState extends State<SearchWidget> {
|
|||
String query,
|
||||
) {
|
||||
int resultCount = 0;
|
||||
final maxResultCount = _isYearValid(query) ? 13 : 12;
|
||||
final maxResultCount = _isYearValid(query) ? 12 : 11;
|
||||
final streamController = StreamController<List<SearchResult>>();
|
||||
|
||||
if (query.isEmpty) {
|
||||
|
@ -260,10 +260,11 @@ class SearchWidgetState extends State<SearchWidget> {
|
|||
onResultsReceived(locationResult);
|
||||
},
|
||||
);
|
||||
|
||||
_searchService.getAllFace(null).then(
|
||||
(locationResult) {
|
||||
(faceResult) {
|
||||
final List<GenericSearchResult> filteredResults = [];
|
||||
for (final result in locationResult) {
|
||||
for (final result in faceResult) {
|
||||
if (result.name().toLowerCase().contains(query.toLowerCase())) {
|
||||
filteredResults.add(result);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue