Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove hardcoded cacheExtent to use Flutter's default value

ashilkn23dc8095891d
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
index 11a4d4e457..bb537972ba 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
@@ -604,7 +604,6 @@ class GalleryState extends State<Gallery> {
? const NeverScrollableScrollPhysics()
: const ExponentialBouncingScrollPhysics(),
controller: _scrollController,
- cacheExtent: 1000,
slivers: [
SliverToBoxAdapter(
child: SizeChangedLayoutNotifier(
@@ -642,25 +641,6 @@ class GalleryState extends State<Gallery> {
),
);
}
-
- double get galleryCacheExtent {
- final int photoGridSize = localSettings.getPhotoGridSize();
- switch (photoGridSize) {
- case 2:
- case 3:
- return 1000;
- case 4:
- return 850;
- case 5:
- return 600;
- case 6:
- return 300;
- default:
- throw StateError(
- 'Invalid photo grid size configuration: $photoGridSize',
- );
- }
- }
}
class PinnedGroupHeader extends StatefulWidget {