mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
fix changing search target in search result page
This commit is contained in:
@@ -42,7 +42,7 @@ class _SearchResultPageState extends State<SearchResultPage> {
|
|||||||
|
|
||||||
void search([String? text]) {
|
void search([String? text]) {
|
||||||
if (text != null) {
|
if (text != null) {
|
||||||
if(suggestionsController.entry != null) {
|
if (suggestionsController.entry != null) {
|
||||||
suggestionsController.remove();
|
suggestionsController.remove();
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -135,20 +135,24 @@ class _SearchResultPageState extends State<SearchResultPage> {
|
|||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
action: buildAction(),
|
action: buildAction(),
|
||||||
),
|
),
|
||||||
loadPage: source!.searchPageData!.loadPage == null ? null : (i) {
|
loadPage: source!.searchPageData!.loadPage == null
|
||||||
return source.searchPageData!.loadPage!(
|
? null
|
||||||
text,
|
: (i) {
|
||||||
i,
|
return source.searchPageData!.loadPage!(
|
||||||
options,
|
text,
|
||||||
);
|
i,
|
||||||
},
|
options,
|
||||||
loadNext: source.searchPageData!.loadNext == null ? null : (i) {
|
);
|
||||||
return source.searchPageData!.loadNext!(
|
},
|
||||||
text,
|
loadNext: source.searchPageData!.loadNext == null
|
||||||
i,
|
? null
|
||||||
options,
|
: (i) {
|
||||||
);
|
return source.searchPageData!.loadNext!(
|
||||||
},
|
text,
|
||||||
|
i,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,6 +428,11 @@ class _SearchSettingsDialogState extends State<_SearchSettingsDialog> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
searchTarget = e.key;
|
searchTarget = e.key;
|
||||||
options.clear();
|
options.clear();
|
||||||
|
final searchOptions = ComicSource.find(searchTarget)!
|
||||||
|
.searchPageData!
|
||||||
|
.searchOptions ??
|
||||||
|
<SearchOptions>[];
|
||||||
|
options = searchOptions.map((e) => e.defaultValue).toList();
|
||||||
onChanged();
|
onChanged();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user