GitLab search (#422) + better settings UI

This commit is contained in:
Imran Remtulla
2023-05-06 00:06:48 -04:00
parent 8ca5964d31
commit b4642e16ad
15 changed files with 138 additions and 38 deletions

View File

@@ -248,9 +248,18 @@ class _AddAppPageState extends State<AddAppPage> {
searching = true;
});
try {
var results = await Future.wait(sourceProvider.sources
.where((e) => e.canSearch)
.map((e) => e.search(searchQuery)));
var results = await Future.wait(
sourceProvider.sources.where((e) => e.canSearch).map((e) async {
try {
return await e.search(searchQuery);
} catch (err) {
if (err is! CredsNeededError) {
rethrow;
} else {
return <String, List<String>>{};
}
}
}));
// .then((results) async {
// Interleave results instead of simple reduce