From fe2bf0c6dd27072f09004079030c4964f7597888 Mon Sep 17 00:00:00 2001 From: TheBestX11 <105053411+TheBestX11@users.noreply.github.com> Date: Thu, 7 May 2026 18:22:35 +0300 Subject: [PATCH] fix(mobile): correct filter default and UI desync in similar photos search (#27516) * fix(mobile): view similar defaults to images only * fix(mobile): reset filter chips when pre-filter is applied --------- Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> --- .../pages/search/drift_search.page.dart | 13 ++++++++++--- .../similar_photos_action_button.widget.dart | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 881daf9d38..c5d7d0f36d 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -106,10 +106,17 @@ class DriftSearchPage extends HookConsumerWidget { Future.microtask(() { textSearchController.clear(); + peopleCurrentFilterWidget.value = null; + dateRangeCurrentFilterWidget.value = null; + cameraCurrentFilterWidget.value = null; + tagCurrentFilterWidget.value = null; + mediaTypeCurrentFilterWidget.value = null; + ratingCurrentFilterWidget.value = null; + displayOptionCurrentFilterWidget.value = null; + locationCurrentFilterWidget.value = preFilter.location.city != null + ? Text(preFilter.location.city!, style: context.textTheme.labelLarge) + : null; search(preFilter); - if (preFilter.location.city != null) { - locationCurrentFilterWidget.value = Text(preFilter.location.city!, style: context.textTheme.labelLarge); - } }); return null; diff --git a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart index 0acbbce613..42dcfa683a 100644 --- a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart @@ -37,7 +37,7 @@ class SimilarPhotosActionButton extends ConsumerWidget { date: SearchDateFilter(), display: SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), rating: SearchRatingFilter(), - mediaType: AssetType.image, + mediaType: AssetType.other, ), );