π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Clear all file selections when filters are applied
ashilkn6a692ebc7333
diff --git a/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dart b/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dartindex cb11444103..52cc089c71 100644--- a/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dart+++ b/mobile/lib/ui/viewer/actions/file_selection_overlay_bar.dart@@ -53,7 +53,7 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {_hasSelectedFilesNotifier.dispose();widget.selectedFiles.removeListener(_selectedFilesListener);_searchFilterDataProvider?.removeListener(- listener: _updateGalleryTypeIfRequired,+ listener: _filterAppliedListener,fromApplied: true,);super.dispose();@@ -75,11 +75,11 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {inheritedSearchFilterData!.searchFilterDataProvider;_searchFilterDataProvider!.removeListener(- listener: _updateGalleryTypeIfRequired,+ listener: _filterAppliedListener,fromApplied: true,);_searchFilterDataProvider!.addListener(- listener: _updateGalleryTypeIfRequired,+ listener: _filterAppliedListener,toApplied: true,);}@@ -160,6 +160,11 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {_hasSelectedFilesNotifier.value = widget.selectedFiles.files.isNotEmpty;}+ void _filterAppliedListener() {+ widget.selectedFiles.clearAll();+ _updateGalleryTypeIfRequired();+ }+/// This method is used to update the GalleryType if the initial filter is/// removed from the applied filters. As long as the inital filter is present/// in the applied filters, the gallery type will remain the same as the type