diff --git a/lib/ui/viewer/search/search_suggestions.dart b/lib/ui/viewer/search/search_suggestions.dart index 6bcb24767..c9fb647bb 100644 --- a/lib/ui/viewer/search/search_suggestions.dart +++ b/lib/ui/viewer/search/search_suggestions.dart @@ -88,8 +88,9 @@ class _SearchSuggestionsWidgetState extends State { } ///This method generates searchResultsWidgets from the queueOfEvents by checking - ///every 60ms if the queue is empty or not. If the queue is not empty, it - ///generates the widgets and clears the queue and updates the UI. + ///every [_surfaceNewResultsInterval] if the queue is empty or not. If the + ///queue is not empty, it generates the widgets and clears the queue and + ///updates the UI. void generateResultWidgetsInIntervalsFromQueue() { timer = Timer.periodic( const Duration(milliseconds: _surfaceNewResultsInterval), (timer) { diff --git a/lib/ui/viewer/search/search_widget.dart b/lib/ui/viewer/search/search_widget.dart index ba713716c..de28c78dc 100644 --- a/lib/ui/viewer/search/search_widget.dart +++ b/lib/ui/viewer/search/search_widget.dart @@ -299,9 +299,7 @@ class SearchWidgetState extends State { _searchService.getHolidaySearchResults(context, query).then( (holidayResults) { streamController.sink.add(holidayResults); - resultCount++; - if (resultCount == maxResultCount) { streamController.close(); } @@ -312,7 +310,6 @@ class SearchWidgetState extends State { (fileTypeSearchResults) { streamController.sink.add(fileTypeSearchResults); resultCount++; - if (resultCount == maxResultCount) { streamController.close(); } @@ -323,7 +320,6 @@ class SearchWidgetState extends State { (captionAndDisplayNameResult) { streamController.sink.add(captionAndDisplayNameResult); resultCount++; - if (resultCount == maxResultCount) { streamController.close(); } @@ -354,7 +350,6 @@ class SearchWidgetState extends State { (collectionResults) { streamController.sink.add(collectionResults); resultCount++; - if (resultCount == maxResultCount) { streamController.close(); }