From 85b74844260f5fa02be079d110df4f88c758fb7e Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Sun, 24 Nov 2024 22:56:07 +0530 Subject: [PATCH] [mob][photos] Reduce max number of thumbnails --- .../people/person_cluster_suggestion.dart | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart b/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart index cd4a229bd3..e296150668 100644 --- a/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart +++ b/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart @@ -341,8 +341,8 @@ class _PersonClustersState extends State { ], ); // Precompute face thumbnails for next suggestions, in case there are - const precomputeSuggestions = 8; - const maxPrecomputations = 8; + const precomputeSuggestions = 6; + const maxPrecomputations = 6; int compCount = 0; if (allSuggestions.length > currentSuggestionIndex + 1) { outerLoop: @@ -355,7 +355,7 @@ class _PersonClustersState extends State { )) { final files = suggestion.filesInCluster; final clusterID = suggestion.clusterIDToMerge; - for (final file in files.sublist(0, min(files.length, 9))) { + for (final file in files.sublist(0, min(files.length, 6))) { unawaited( precomputeNextFaceCrops( file, @@ -409,16 +409,16 @@ class _PersonClustersState extends State { start: 3, ), ), - if (files.length > 6) - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: _buildThumbnailWidgetsRow( - files, - clusterID, - faceThumbnails, - start: 6, - ), - ), + // if (files.length > 6) + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: _buildThumbnailWidgetsRow( + // files, + // clusterID, + // faceThumbnails, + // start: 6, + // ), + // ), ], ); } else if (snapshot.hasError) { @@ -462,7 +462,7 @@ class _PersonClustersState extends State { faceThumbnails[files[start + index].uploadedFileID!], ), ), - if (start + index == 8 && files.length > 9) + if (start + index == 5 && files.length > 6) ClipPath( clipper: ShapeBorderClipper( shape: ContinuousRectangleBorder( @@ -475,7 +475,7 @@ class _PersonClustersState extends State { ), child: Center( child: Text( - '+${files.length - 8}', + '+${files.length - 5}', style: darkTheme.textTheme.h3Bold, ), ),