Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix memory leak in GalleryBoundariesProvider

ashilkn73bec7beb02a
diff --git a/mobile/apps/photos/lib/core/configuration.dart b/mobile/apps/photos/lib/core/configuration.dart
index 4c079f5f25..48b63b261d 100644
--- a/mobile/apps/photos/lib/core/configuration.dart
+++ b/mobile/apps/photos/lib/core/configuration.dart
@@ -108,11 +108,12 @@ class Configuration {
_documentsDirectory + "/ente-shared-media";
Directory(_sharedDocumentsMediaDirectory).createSync(recursive: true);
if (!_preferences.containsKey(tokenKey)) {
- _logger
- .info("(for debugging) Token not found, deleting all secure storage data");
+ _logger.info(
+ "(for debugging) Token not found, deleting all secure storage data");
await _secureStorage.deleteAll();
} else {
- _logger.info("(for debugging) Token found, loading secure storage data");
+ _logger
+ .info("(for debugging) Token found, loading secure storage data");
_key = await _secureStorage.read(
key: keyKey,
);
@@ -702,7 +703,8 @@ class Configuration {
}
Future<void> _migrateSecurityStorageToFirstUnlock() async {
- _logger.info("(for debugging) Migrating secure storage to first unlock if needed");
+ _logger.info(
+ "(for debugging) Migrating secure storage to first unlock if needed");
final hasMigratedSecureStorage =
_preferences.getBool(hasMigratedSecureStorageKey) ?? false;
if (!hasMigratedSecureStorage && _key != null && _secretKey != null) {
diff --git a/mobile/apps/photos/lib/services/collections_service.dart b/mobile/apps/photos/lib/services/collections_service.dart
index d581da7b0a..b1b6868492 100644
--- a/mobile/apps/photos/lib/services/collections_service.dart
+++ b/mobile/apps/photos/lib/services/collections_service.dart
@@ -867,7 +867,9 @@ class CollectionsService {
publicUrl = publicUrl.replace(
host: embedUri.host,
scheme: embedUri.scheme,
- port: embedUri.hasPort ? embedUri.port : (embedUri.scheme == 'https' ? 443 : 80),
+ port: embedUri.hasPort
+ ? embedUri.port
+ : (embedUri.scheme == 'https' ? 443 : 80),
);
}
diff --git a/mobile/apps/photos/lib/ui/home/home_gallery_widget.dart b/mobile/apps/photos/lib/ui/home/home_gallery_widget.dart
index ce4e8d3082..c89734d65b 100644
--- a/mobile/apps/photos/lib/ui/home/home_gallery_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/home_gallery_widget.dart
@@ -77,10 +77,6 @@ class _HomeGalleryWidgetState extends State<HomeGalleryWidget> {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
key: ValueKey(_shouldHideSharedItems),
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) async {
@@ -141,9 +137,6 @@ class _HomeGalleryWidgetState extends State<HomeGalleryWidget> {
showGallerySettingsCTA: true,
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: SelectionState(
selectedFiles: widget.selectedFiles,
diff --git a/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart b/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart
index 98104f3d70..8a52acac3f 100644
--- a/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart
+++ b/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart
@@ -48,17 +48,10 @@ class _MapPullUpGalleryState extends State<MapPullUpGallery> {
final unsafeAreaProportion = widget.bottomUnsafeArea / screenHeight;
final double initialChildSize = 0.25 + unsafeAreaProportion;
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
Widget? cachedScrollableContent;
return DeferredPointerHandler(
child: GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: SelectionState(
selectedFiles: _selectedFiles,
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/archive_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/archive_page.dart
index ae88f95f8f..321bb5936c 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/archive_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/archive_page.dart
@@ -34,10 +34,6 @@ class ArchivePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final Set<int> hiddenCollectionIDs =
CollectionsService.instance.getHiddenCollectionIds();
final gallery = Gallery(
@@ -85,9 +81,6 @@ class ArchivePage extends StatelessWidget {
),
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/collection_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/collection_page.dart
index c68b717439..fd81a79f6c 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/collection_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/collection_page.dart
@@ -116,10 +116,6 @@ class CollectionPage extends StatelessWidget {
: const SizedBox(height: 212),
);
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
return GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: SearchFilterDataProvider(
@@ -130,9 +126,6 @@ class CollectionPage extends StatelessWidget {
),
),
child: GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: Scaffold(
appBar: PreferredSize(
preferredSize: const Size.fromHeight(90.0),
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/device_folder_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/device_folder_page.dart
index 963b9d2af8..e50c08b16a 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/device_folder_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/device_folder_page.dart
@@ -34,10 +34,6 @@ class DeviceFolderPage extends StatelessWidget {
@override
Widget build(Object context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final int? userID = Configuration.instance.getUserID();
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) {
@@ -64,9 +60,6 @@ class DeviceFolderPage extends StatelessWidget {
initialFiles: [deviceCollection.thumbnail!],
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index aecbf4ab3f..3c6178cb13 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -792,7 +792,9 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
await flagService.setMapEnabled(true);
} catch (e) {
showShortToast(
- context, AppLocalizations.of(context).somethingWentWrong,);
+ context,
+ AppLocalizations.of(context).somethingWentWrong,
+ );
return;
}
}
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/hidden_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/hidden_page.dart
index 311128836a..73b100e20b 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/hidden_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/hidden_page.dart
@@ -88,10 +88,6 @@ class _HiddenPageState extends State<HiddenPage> {
if (_defaultHiddenCollectionId == null) {
return const EnteLoadingWidget();
}
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) {
return FilesDB.instance.getFilesInCollections(
@@ -138,9 +134,6 @@ class _HiddenPageState extends State<HiddenPage> {
),
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/large_files_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/large_files_page.dart
index eb086f48d3..199302a697 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/large_files_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/large_files_page.dart
@@ -39,9 +39,6 @@ class LargeFilesPagePage extends StatefulWidget {
class _LargeFilesPagePageState extends State<LargeFilesPagePage> {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) async {
final List<EnteFile> allFiles =
@@ -82,9 +79,6 @@ class _LargeFilesPagePageState extends State<LargeFilesPagePage> {
albumName: AppLocalizations.of(context).viewLargeFiles,
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: const PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/shared_public_collection_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/shared_public_collection_page.dart
index 3dfdd3426e..3e9a21e625 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/shared_public_collection_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/shared_public_collection_page.dart
@@ -69,10 +69,6 @@ class _SharedPublicCollectionPageState
@override
Widget build(BuildContext context) {
logger.info("Building SharedPublicCollectionPage");
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final List<EnteFile>? initialFiles =
widget.c.thumbnail != null ? [widget.c.thumbnail!] : null;
@@ -142,9 +138,6 @@ class _SharedPublicCollectionPageState
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/state/gallery_boundaries_provider.dart b/mobile/apps/photos/lib/ui/viewer/gallery/state/gallery_boundaries_provider.dart
index f603f035df..31721e131f 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/state/gallery_boundaries_provider.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/state/gallery_boundaries_provider.dart
@@ -1,25 +1,51 @@
import 'package:flutter/material.dart';
-/// InheritedWidget to share gallery boundaries and scroll controller
-/// between Gallery and its surrounding widgets for auto-scroll functionality
-class GalleryBoundariesProvider extends InheritedWidget {
+/// StatefulWidget that manages gallery boundaries and scroll controller lifecycle
+class GalleryBoundariesProvider extends StatefulWidget {
+ final Widget child;
+
+ const GalleryBoundariesProvider({
+ super.key,
+ required this.child,
+ });
+
+ @override
+ State<GalleryBoundariesProvider> createState() =>
+ GalleryBoundariesProviderState();
+
+ static InheritedGalleryBoundaries? of(BuildContext context) {
+ return context
+ .dependOnInheritedWidgetOfExactType<InheritedGalleryBoundaries>();
+ }
+}
+
+/// State class that manages the lifecycle of boundary notifiers
+class GalleryBoundariesProviderState extends State<GalleryBoundariesProvider> {
/// Bottom edge position of the top fixed widget (e.g., AppBar)
- final ValueNotifier<double?> topBoundaryNotifier;
+ late final ValueNotifier<double?> topBoundaryNotifier;
/// Top edge position of the bottom fixed widget (e.g., FileSelectionOverlayBar)
- final ValueNotifier<double?> bottomBoundaryNotifier;
+ late final ValueNotifier<double?> bottomBoundaryNotifier;
/// Reference to Gallery's ScrollController
/// Using ValueNotifier to maintain immutability
- final ValueNotifier<ScrollController?> scrollControllerNotifier;
+ late final ValueNotifier<ScrollController?> scrollControllerNotifier;
- const GalleryBoundariesProvider({
- super.key,
- required super.child,
- required this.topBoundaryNotifier,
- required this.bottomBoundaryNotifier,
- required this.scrollControllerNotifier,
- });
+ @override
+ void initState() {
+ super.initState();
+ topBoundaryNotifier = ValueNotifier<double?>(null);
+ bottomBoundaryNotifier = ValueNotifier<double?>(null);
+ scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
+ }
+
+ @override
+ void dispose() {
+ topBoundaryNotifier.dispose();
+ bottomBoundaryNotifier.dispose();
+ scrollControllerNotifier.dispose();
+ super.dispose();
+ }
/// Set the scroll controller from Gallery widget
void setScrollController(ScrollController? controller) {
@@ -36,21 +62,54 @@ class GalleryBoundariesProvider extends InheritedWidget {
bottomBoundaryNotifier.value = boundary;
}
- static GalleryBoundariesProvider? of(BuildContext context) {
- return context
- .dependOnInheritedWidgetOfExactType<GalleryBoundariesProvider>();
+ @override
+ Widget build(BuildContext context) {
+ return InheritedGalleryBoundaries(
+ state: this,
+ child: widget.child,
+ );
+ }
+}
+
+/// Public InheritedWidget to share gallery boundaries and scroll controller
+/// between Gallery and its surrounding widgets for auto-scroll functionality
+class InheritedGalleryBoundaries extends InheritedWidget {
+ final GalleryBoundariesProviderState state;
+
+ const InheritedGalleryBoundaries({
+ super.key,
+ required this.state,
+ required super.child,
+ });
+
+ /// Bottom edge position of the top fixed widget (e.g., AppBar)
+ ValueNotifier<double?> get topBoundaryNotifier => state.topBoundaryNotifier;
+
+ /// Top edge position of the bottom fixed widget (e.g., FileSelectionOverlayBar)
+ ValueNotifier<double?> get bottomBoundaryNotifier =>
+ state.bottomBoundaryNotifier;
+
+ /// Reference to Gallery's ScrollController
+ ValueNotifier<ScrollController?> get scrollControllerNotifier =>
+ state.scrollControllerNotifier;
+
+ /// Set the scroll controller from Gallery widget
+ void setScrollController(ScrollController? controller) {
+ state.setScrollController(controller);
}
- @override
- bool updateShouldNotify(GalleryBoundariesProvider oldWidget) {
- return scrollControllerNotifier != oldWidget.scrollControllerNotifier ||
- topBoundaryNotifier != oldWidget.topBoundaryNotifier ||
- bottomBoundaryNotifier != oldWidget.bottomBoundaryNotifier;
+ /// Set the top boundary position
+ void setTopBoundary(double? boundary) {
+ state.setTopBoundary(boundary);
}
- void dispose() {
- topBoundaryNotifier.dispose();
- bottomBoundaryNotifier.dispose();
- scrollControllerNotifier.dispose();
+ /// Set the bottom boundary position
+ void setBottomBoundary(double? boundary) {
+ state.setBottomBoundary(boundary);
+ }
+
+ @override
+ bool updateShouldNotify(InheritedGalleryBoundaries oldWidget) {
+ return false;
}
}
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart b/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart
index b2a3adcdd0..520b70ae0e 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart
@@ -241,7 +241,7 @@ class _SwipeSelectionWrapperState extends State<SwipeSelectionWrapper>
}
/// Check if pointer is outside boundaries and start/stop auto-scroll
- void _checkAndHandleAutoScroll(GalleryBoundariesProvider? provider) {
+ void _checkAndHandleAutoScroll(InheritedGalleryBoundaries? provider) {
if (provider == null) return;
final topBoundary = provider.topBoundaryNotifier.value;
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart
index 96cab91fc0..e7d3444966 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart
@@ -32,10 +32,6 @@ class TrashPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final bool filesAreSelected = _selectedFiles.files.isNotEmpty;
final gallery = Gallery(
@@ -64,9 +60,6 @@ class TrashPage extends StatelessWidget {
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/uncategorized_page.dart b/mobile/apps/photos/lib/ui/viewer/gallery/uncategorized_page.dart
index a240e61ec1..fc4f1adbc3 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/uncategorized_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/uncategorized_page.dart
@@ -39,10 +39,6 @@ class UnCategorizedPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) async {
final FileLoadResult result =
@@ -85,9 +81,6 @@ class UnCategorizedPage extends StatelessWidget {
albumName: AppLocalizations.of(context).uncategorized,
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: SearchFilterDataProvider(
diff --git a/mobile/apps/photos/lib/ui/viewer/location/location_screen.dart b/mobile/apps/photos/lib/ui/viewer/location/location_screen.dart
index 8b9dfe0246..dc3d090ec0 100644
--- a/mobile/apps/photos/lib/ui/viewer/location/location_screen.dart
+++ b/mobile/apps/photos/lib/ui/viewer/location/location_screen.dart
@@ -47,14 +47,7 @@ class _LocationScreenState extends State<LocationScreen> {
final locationTag =
InheritedLocationScreenState.of(context).locationTagEntity.item;
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: SearchFilterDataProvider(
diff --git a/mobile/apps/photos/lib/ui/viewer/people/cluster_page.dart b/mobile/apps/photos/lib/ui/viewer/people/cluster_page.dart
index cb70de7fc5..3476e4b098 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/cluster_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/cluster_page.dart
@@ -115,10 +115,6 @@ class _ClusterPageState extends State<ClusterPage> {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) {
final result = files
@@ -183,9 +179,6 @@ class _ClusterPageState extends State<ClusterPage> {
: null,
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: Scaffold(
appBar: PreferredSize(
diff --git a/mobile/apps/photos/lib/ui/viewer/people/people_page.dart b/mobile/apps/photos/lib/ui/viewer/people/people_page.dart
index 624ba0ad7f..2195a04cfe 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/people_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/people_page.dart
@@ -130,14 +130,8 @@ class _PeoplePageState extends State<PeoplePage> {
@override
Widget build(BuildContext context) {
_logger.info("Building for ${_person.data.name}");
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: _searchFilterDataProvider,
diff --git a/mobile/apps/photos/lib/ui/viewer/search/result/contact_result_page.dart b/mobile/apps/photos/lib/ui/viewer/search/result/contact_result_page.dart
index a1fd8fd160..6027a9b164 100644
--- a/mobile/apps/photos/lib/ui/viewer/search/result/contact_result_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search/result/contact_result_page.dart
@@ -93,10 +93,6 @@ class _ContactResultPageState extends State<ContactResultPage> {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) {
final result = files
@@ -156,9 +152,6 @@ class _ContactResultPageState extends State<ContactResultPage> {
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: _searchFilterDataProvider,
diff --git a/mobile/apps/photos/lib/ui/viewer/search/result/magic_result_screen.dart b/mobile/apps/photos/lib/ui/viewer/search/result/magic_result_screen.dart
index 86545e8406..9c79e46337 100644
--- a/mobile/apps/photos/lib/ui/viewer/search/result/magic_result_screen.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search/result/magic_result_screen.dart
@@ -141,10 +141,6 @@ class _MagicResultScreenState extends State<MagicResultScreen> {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
key: ValueKey(_enableGrouping),
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) {
@@ -174,9 +170,6 @@ class _MagicResultScreenState extends State<MagicResultScreen> {
initialFiles: [files.first],
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: _searchFilterDataProvider,
diff --git a/mobile/apps/photos/lib/ui/viewer/search/result/search_result_page.dart b/mobile/apps/photos/lib/ui/viewer/search/result/search_result_page.dart
index c07d9790d3..2a6630b9be 100644
--- a/mobile/apps/photos/lib/ui/viewer/search/result/search_result_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search/result/search_result_page.dart
@@ -74,10 +74,6 @@ class _SearchResultPageState extends State<SearchResultPage> {
@override
Widget build(BuildContext context) {
- final topBoundaryNotifier = ValueNotifier<double?>(null);
- final bottomBoundaryNotifier = ValueNotifier<double?>(null);
- final scrollControllerNotifier = ValueNotifier<ScrollController?>(null);
-
final gallery = Gallery(
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) {
final result = files
@@ -109,9 +105,6 @@ class _SearchResultPageState extends State<SearchResultPage> {
);
return GalleryBoundariesProvider(
- topBoundaryNotifier: topBoundaryNotifier,
- bottomBoundaryNotifier: bottomBoundaryNotifier,
- scrollControllerNotifier: scrollControllerNotifier,
child: GalleryFilesState(
child: InheritedSearchFilterDataWrapper(
searchFilterDataProvider: _searchFilterDataProvider,