fixed search when using the query bar
This commit is contained in:
parent
298637a3c6
commit
8513da9c15
2 changed files with 13 additions and 6 deletions
|
@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
|
|||
### Fixed
|
||||
|
||||
- Viewer: playing video from app content provider
|
||||
- Search: using the query bar yields a black screen
|
||||
|
||||
## <a id="v1.8.3"></a>[v1.8.3] - 2023-03-13
|
||||
|
||||
|
|
|
@ -272,14 +272,20 @@ class CollectionSearchDelegate extends AvesSearchDelegate with FeedbackMixin, Va
|
|||
);
|
||||
}
|
||||
|
||||
var _selectingFromQuery = false;
|
||||
|
||||
@override
|
||||
Widget buildResults(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// `buildResults` is called in the build phase,
|
||||
// so we post the call that will filter the collection
|
||||
// and possibly trigger a rebuild here
|
||||
_select(context, _buildQueryFilter(true));
|
||||
});
|
||||
// guard against multiple build calls
|
||||
if (!_selectingFromQuery) {
|
||||
_selectingFromQuery = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// `buildResults` is called in the build phase,
|
||||
// so we post the call that will filter the collection
|
||||
// and possibly trigger a rebuild here
|
||||
_select(context, _buildQueryFilter(true));
|
||||
});
|
||||
}
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue