Skip to content

armgit / ente

Public Imported from GitHub
0

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

Formatting changes

ashilkn5a2477c06558
diff --git a/mobile/apps/photos/lib/services/wrapped/builders/badge_selector.dart b/mobile/apps/photos/lib/services/wrapped/builders/badge_selector.dart
index 9057ea32af..00d6079558 100644
--- a/mobile/apps/photos/lib/services/wrapped/builders/badge_selector.dart
+++ b/mobile/apps/photos/lib/services/wrapped/builders/badge_selector.dart
@@ -136,9 +136,8 @@ class WrappedBadgeSelector {
static _BadgeCandidate _buildConsistencyChamp(
_BadgeComputationContext metrics,
) {
- final double streakScore = metrics.longestStreakDays <= 0
- ? 0
- : metrics.longestStreakDays / 150.0;
+ final double streakScore =
+ metrics.longestStreakDays <= 0 ? 0 : metrics.longestStreakDays / 150.0;
final double activeRatio = metrics.daysWithCaptures / 365.0;
final double score = _clamp01(
0.5 * _clamp01(streakScore) + 0.5 * _clamp01(activeRatio),
@@ -235,18 +234,16 @@ class WrappedBadgeSelector {
if (!metrics.peopleStats.hasFaceMoments || metrics.totalCount <= 0) {
return null;
}
- final int totalNamedMoments =
- metrics.peopleStats.totalNamedFaceMoments;
+ final int totalNamedMoments = metrics.peopleStats.totalNamedFaceMoments;
if (totalNamedMoments <= 0) {
return null;
}
- final double share =
- totalNamedMoments / metrics.totalCount.toDouble();
+ final double share = totalNamedMoments / metrics.totalCount.toDouble();
final double score = _clamp01(share);
final int percent = _percentOf(share);
- final bool eligible = metrics.totalCount >= 80 &&
- totalNamedMoments >= 16 && score >= 0.30;
+ final bool eligible =
+ metrics.totalCount >= 80 && totalNamedMoments >= 16 && score >= 0.30;
final List<String> chips = <String>[
"Moments with people: $totalNamedMoments",
diff --git a/mobile/apps/photos/lib/services/wrapped/wrapped_service.dart b/mobile/apps/photos/lib/services/wrapped/wrapped_service.dart
index 74ee0c5a06..7226f9ce46 100644
--- a/mobile/apps/photos/lib/services/wrapped/wrapped_service.dart
+++ b/mobile/apps/photos/lib/services/wrapped/wrapped_service.dart
@@ -110,8 +110,7 @@ class WrappedService {
);
updateResult(cached);
if (_shouldScheduleDailyRecompute(cached)) {
- _logger
- .info("Scheduling daily Wrapped recompute for $_kWrappedYear");
+ _logger.info("Scheduling daily Wrapped recompute for $_kWrappedYear");
unawaited(
_runCompute(reason: "daily", bypassFlag: false),
);
diff --git a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart
index 91aaaafa1b..90ffd3e93b 100644
--- a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart
+++ b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart
@@ -585,7 +585,8 @@ class CollectionActions {
final isCollectionOwner = collection.owner.id == currentUserID;
final bool canRemoveAllParticipants =
collectionsService.canRemoveFilesFromAllParticipants(collection);
- final bool isCollectionAdmin = canRemoveAllParticipants && !isCollectionOwner;
+ final bool isCollectionAdmin =
+ canRemoveAllParticipants && !isCollectionOwner;
final FilesSplit split = FilesSplit.split(
files,
Configuration.instance.getUserID()!,
diff --git a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
index 2bb2160603..a4a97a69a9 100644
--- a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
+++ b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
@@ -48,7 +48,9 @@ Future<void> handleLimitedOrFolderBackupFlow(
if (permissionService.hasGrantedLimitedPermissions()) {
unawaited(PhotoManager.presentLimited());
} else {
- unawaited(_navigateToFolderSelection(context, isFirstBackup: isFirstBackup));
+ unawaited(
+ _navigateToFolderSelection(context, isFirstBackup: isFirstBackup),
+ );
}
}