Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Resolve merge conflicts and merge main

ashilkn79e49d49d433
diff --cc mobile/lib/ui/viewer/gallery/collection_page.dart
index 5a8997aa29,fdfa8494f3..57990b0b1e
--- a/mobile/lib/ui/viewer/gallery/collection_page.dart
+++ b/mobile/lib/ui/viewer/gallery/collection_page.dart
@@@ -19,8 -17,7 +19,9 @@@ import "package:photos/ui/viewer/galler
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/gallery_files_inherited_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 {
@@@ -102,42 -99,36 +103,45 @@@
? const SizedBox(height: 20)
: const SizedBox(height: 212),
);
- return InheritedSearchFilterData(
- searchFilterDataProvider: SearchFilterDataProvider()
- ..initialGalleryFilter = AlbumFilter(
- collectionID: c.collection.id,
- albumName: c.collection.displayName,
- occurrence: kMostRelevantFilter,
- ),
- child: Scaffold(
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(50.0),
- child: GalleryAppBarWidget(
- galleryType,
- c.collection.displayName,
- _selectedFiles,
- collection: c.collection,
- isFromCollectPhotos: isFromCollectPhotos,
++
+ return GalleryFilesState(
- child: Scaffold(
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(50.0),
- child: GalleryAppBarWidget(
- galleryType,
- c.collection.displayName,
- _selectedFiles,
- collection: c.collection,
- isFromCollectPhotos: isFromCollectPhotos,
++ child: InheritedSearchFilterData(
++ searchFilterDataProvider: SearchFilterDataProvider()
++ ..initialGalleryFilter = AlbumFilter(
++ collectionID: c.collection.id,
++ albumName: c.collection.displayName,
++ occurrence: kMostRelevantFilter,
),
-- ),
-- 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,
-- ),
-- ],
++ 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,
++ ),
++ ],
++ ),
),
),
),
diff --cc mobile/lib/ui/viewer/gallery/gallery.dart
index 2a3f7fc8cf,db2f1d2906..d637add390
--- a/mobile/lib/ui/viewer/gallery/gallery.dart
+++ b/mobile/lib/ui/viewer/gallery/gallery.dart
@@@ -20,11 -16,8 +20,11 @@@ import "package:photos/ui/viewer/galler
import "package:photos/ui/viewer/gallery/component/multiple_groups_gallery_view.dart";
import 'package:photos/ui/viewer/gallery/empty_state.dart';
import "package:photos/ui/viewer/gallery/state/gallery_context_state.dart";
+ import "package:photos/ui/viewer/gallery/state/gallery_files_inherited_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";
import "package:photos/utils/debouncer.dart";
+import "package:photos/utils/hierarchical_search_util.dart";
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
typedef GalleryLoader = Future<FileLoadResult> Function(
diff --cc mobile/lib/ui/viewer/search/result/search_result_page.dart
index 6bd1f33758,ee0ed6ad45..6b74e870a2
--- a/mobile/lib/ui/viewer/search/result/search_result_page.dart
+++ b/mobile/lib/ui/viewer/search/result/search_result_page.dart
@@@ -12,8 -12,7 +12,9 @@@ import 'package:photos/models/selected_
import 'package:photos/ui/viewer/actions/file_selection_overlay_bar.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/gallery_files_inherited_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 SearchResultPage extends StatefulWidget {
@@@ -93,28 -92,27 +94,31 @@@ class _SearchResultPageState extends St
enableFileGrouping: widget.enableGrouping,
initialFiles: [widget.searchResult.resultFiles().first],
);
- return InheritedSearchFilterData(
- searchFilterDataProvider: SearchFilterDataProvider(),
- child: Scaffold(
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(90.0),
- child: GalleryAppBarWidget(
- SearchResultPage.appBarType,
- widget.searchResult.name(),
- _selectedFiles,
++
+ return GalleryFilesState(
- child: Scaffold(
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(50.0),
- child: GalleryAppBarWidget(
- SearchResultPage.appBarType,
- widget.searchResult.name(),
- _selectedFiles,
++ child: InheritedSearchFilterData(
++ searchFilterDataProvider: SearchFilterDataProvider(),
++ child: Scaffold(
++ appBar: PreferredSize(
++ preferredSize: const Size.fromHeight(90.0),
++ child: GalleryAppBarWidget(
++ SearchResultPage.appBarType,
++ widget.searchResult.name(),
++ _selectedFiles,
++ ),
),
-- ),
-- body: SelectionState(
-- selectedFiles: _selectedFiles,
-- child: Stack(
-- alignment: Alignment.bottomCenter,
-- children: [
-- gallery,
-- FileSelectionOverlayBar(
-- SearchResultPage.overlayType,
-- _selectedFiles,
-- ),
-- ],
++ body: SelectionState(
++ selectedFiles: _selectedFiles,
++ child: Stack(
++ alignment: Alignment.bottomCenter,
++ children: [
++ gallery,
++ FileSelectionOverlayBar(
++ SearchResultPage.overlayType,
++ _selectedFiles,
++ ),
++ ],
++ ),
),
),
),