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]) {
|
||||
if (text != null) {
|
||||
if(suggestionsController.entry != null) {
|
||||
if (suggestionsController.entry != null) {
|
||||
suggestionsController.remove();
|
||||
}
|
||||
setState(() {
|
||||
@@ -135,14 +135,18 @@ class _SearchResultPageState extends State<SearchResultPage> {
|
||||
onChanged: onChanged,
|
||||
action: buildAction(),
|
||||
),
|
||||
loadPage: source!.searchPageData!.loadPage == null ? null : (i) {
|
||||
loadPage: source!.searchPageData!.loadPage == null
|
||||
? null
|
||||
: (i) {
|
||||
return source.searchPageData!.loadPage!(
|
||||
text,
|
||||
i,
|
||||
options,
|
||||
);
|
||||
},
|
||||
loadNext: source.searchPageData!.loadNext == null ? null : (i) {
|
||||
loadNext: source.searchPageData!.loadNext == null
|
||||
? null
|
||||
: (i) {
|
||||
return source.searchPageData!.loadNext!(
|
||||
text,
|
||||
i,
|
||||
@@ -424,6 +428,11 @@ class _SearchSettingsDialogState extends State<_SearchSettingsDialog> {
|
||||
setState(() {
|
||||
searchTarget = e.key;
|
||||
options.clear();
|
||||
final searchOptions = ComicSource.find(searchTarget)!
|
||||
.searchPageData!
|
||||
.searchOptions ??
|
||||
<SearchOptions>[];
|
||||
options = searchOptions.map((e) => e.defaultValue).toList();
|
||||
onChanged();
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user