Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use more descriptive names. Deferring of thumbnail loads is only used for gallery

ashilkna1b0eec83b87
diff --git a/mobile/lib/core/constants.dart b/mobile/lib/core/constants.dart
index 5cbd522429..78f3db6bad 100644
--- a/mobile/lib/core/constants.dart
+++ b/mobile/lib/core/constants.dart
@@ -27,8 +27,8 @@ const subGalleryMultiplier = 10;
// used to identify which ente file are available in app cache
const String sharedMediaIdentifier = 'ente-shared-media://';
-const thumbnailDiskLoadDeferDuration = Duration(milliseconds: 500);
-const thumbnailServerLoadDeferDuration = Duration(milliseconds: 80);
+const galleryThumbnailDiskLoadDeferDuration = Duration(milliseconds: 500);
+const galleryThumbnailServerLoadDeferDuration = Duration(milliseconds: 80);
// 256 bit key maps to 24 words
// https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#Generating_the_mnemonic
diff --git a/mobile/lib/ui/tools/deduplicate_page.dart b/mobile/lib/ui/tools/deduplicate_page.dart
index 579b458e0d..91fb3d6ed6 100644
--- a/mobile/lib/ui/tools/deduplicate_page.dart
+++ b/mobile/lib/ui/tools/deduplicate_page.dart
@@ -478,8 +478,9 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
borderRadius: BorderRadius.circular(4),
child: ThumbnailWidget(
file,
- diskLoadDeferDuration: thumbnailDiskLoadDeferDuration,
- serverLoadDeferDuration: thumbnailServerLoadDeferDuration,
+ diskLoadDeferDuration: galleryThumbnailDiskLoadDeferDuration,
+ serverLoadDeferDuration:
+ galleryThumbnailServerLoadDeferDuration,
shouldShowLivePhotoOverlay: true,
key: Key("deduplicate_" + file.tag),
),
diff --git a/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart b/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart
index f7e37f8c54..178744c7d9 100644
--- a/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart
+++ b/mobile/lib/ui/viewer/gallery/component/gallery_file_widget.dart
@@ -55,8 +55,8 @@ class GalleryFileWidget extends StatelessWidget {
final String heroTag = tag + file.tag;
final Widget thumbnailWidget = ThumbnailWidget(
file,
- diskLoadDeferDuration: thumbnailDiskLoadDeferDuration,
- serverLoadDeferDuration: thumbnailServerLoadDeferDuration,
+ diskLoadDeferDuration: galleryThumbnailDiskLoadDeferDuration,
+ serverLoadDeferDuration: galleryThumbnailServerLoadDeferDuration,
shouldShowLivePhotoOverlay: true,
key: Key(heroTag),
thumbnailSize: photoGridSize < photoGridSizeDefault