Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Enable use of hierarchical search in album page

ashilkn798c8f0782c0
diff --git a/mobile/lib/ui/viewer/gallery/collection_page.dart b/mobile/lib/ui/viewer/gallery/collection_page.dart
index 5683c14b8a..901a1a465f 100644
--- a/mobile/lib/ui/viewer/gallery/collection_page.dart
+++ b/mobile/lib/ui/viewer/gallery/collection_page.dart
@@ -17,6 +17,8 @@ import "package:photos/ui/viewer/gallery/empty_album_state.dart";
import 'package:photos/ui/viewer/gallery/empty_state.dart';
import 'package:photos/ui/viewer/gallery/gallery.dart';
import 'package:photos/ui/viewer/gallery/gallery_app_bar_widget.dart';
+import "package:photos/ui/viewer/gallery/state/inherited_search_filter_data.dart";
+import "package:photos/ui/viewer/gallery/state/search_filter_data_provider.dart";
import "package:photos/ui/viewer/gallery/state/selection_state.dart";
class CollectionPage extends StatelessWidget {
@@ -98,35 +100,38 @@ class CollectionPage extends StatelessWidget {
? const SizedBox(height: 20)
: const SizedBox(height: 212),
);
- return Scaffold(
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(50.0),
- child: GalleryAppBarWidget(
- galleryType,
- c.collection.displayName,
- _selectedFiles,
- collection: c.collection,
- isFromCollectPhotos: isFromCollectPhotos,
+ return InheritedSearchFilterData(
+ searchFilterDataProvider: SearchFilterDataProvider(),
+ child: Scaffold(
+ appBar: PreferredSize(
+ preferredSize: const Size.fromHeight(50.0),
+ child: GalleryAppBarWidget(
+ galleryType,
+ c.collection.displayName,
+ _selectedFiles,
+ collection: c.collection,
+ isFromCollectPhotos: isFromCollectPhotos,
+ ),
),
- ),
- bottomNavigationBar: isFromCollectPhotos
- ? CollectPhotosBottomButtons(
- c.collection,
- selectedFiles: _selectedFiles,
- )
- : const SizedBox.shrink(),
- body: SelectionState(
- selectedFiles: _selectedFiles,
- child: Stack(
- alignment: Alignment.bottomCenter,
- children: [
- gallery,
- FileSelectionOverlayBar(
- galleryType,
- _selectedFiles,
- collection: c.collection,
- ),
- ],
+ bottomNavigationBar: isFromCollectPhotos
+ ? CollectPhotosBottomButtons(
+ c.collection,
+ selectedFiles: _selectedFiles,
+ )
+ : const SizedBox.shrink(),
+ body: SelectionState(
+ selectedFiles: _selectedFiles,
+ child: Stack(
+ alignment: Alignment.bottomCenter,
+ children: [
+ gallery,
+ FileSelectionOverlayBar(
+ galleryType,
+ _selectedFiles,
+ collection: c.collection,
+ ),
+ ],
+ ),
),
),
);
diff --git a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index 1fbc0f3ecc..eb7d3a16ba 100644
--- a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -156,7 +156,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
),
),
actions: _getDefaultActions(context),
- bottom: galleryType == GalleryType.searchResults
+ bottom: galleryType == GalleryType.searchResults ||
+ galleryType == GalleryType.ownedCollection
? const PreferredSize(
preferredSize: Size.fromHeight(0),
child: Flexible(child: RecommendedFilters()),