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:
@@ -135,14 +135,18 @@ 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
|
||||||
|
? null
|
||||||
|
: (i) {
|
||||||
return source.searchPageData!.loadPage!(
|
return source.searchPageData!.loadPage!(
|
||||||
text,
|
text,
|
||||||
i,
|
i,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loadNext: source.searchPageData!.loadNext == null ? null : (i) {
|
loadNext: source.searchPageData!.loadNext == null
|
||||||
|
? null
|
||||||
|
: (i) {
|
||||||
return source.searchPageData!.loadNext!(
|
return source.searchPageData!.loadNext!(
|
||||||
text,
|
text,
|
||||||
i,
|
i,
|
||||||
@@ -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