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

This commit is contained in:
ashilkn
2024-09-25 11:53:55 +05:30
parent 1258558be8
commit 798c8f0782
2 changed files with 35 additions and 29 deletions

View File

@@ -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,
),
],
),
),
),
);

View File

@@ -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()),