From 3735249de6112e25f1b242212a8c3f51b5c2de2f Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 9 Feb 2025 21:15:31 +0800 Subject: [PATCH] Fix the issue where page is not reloaded after changing search options in search results page. --- lib/pages/search_result_page.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pages/search_result_page.dart b/lib/pages/search_result_page.dart index f174c14..a0251ee 100644 --- a/lib/pages/search_result_page.dart +++ b/lib/pages/search_result_page.dart @@ -187,7 +187,7 @@ class _SearchResultPageState extends State { suggestionsController.remove(); } - var previousOptions = options; + var previousOptions = List.from(options); var previousSourceKey = sourceKey; await showDialog( context: context, @@ -196,7 +196,8 @@ class _SearchResultPageState extends State { return _SearchSettingsDialog(state: this); }, ); - if (previousOptions != options || previousSourceKey != sourceKey) { + if (!previousOptions.isEqualsTo(options) || + previousSourceKey != sourceKey) { text = checkAutoLanguage(controller.text); controller.currentText = text; setState(() {});