Skip to content

armgit / ente

Public Imported from GitHub
0

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

dart format .

laurenspriem49d9b3c928cb
diff --git a/mobile/apps/photos/lib/ente_theme_data.dart b/mobile/apps/photos/lib/ente_theme_data.dart
index 5b6071cad4..b8b4c4bdaf 100644
--- a/mobile/apps/photos/lib/ente_theme_data.dart
+++ b/mobile/apps/photos/lib/ente_theme_data.dart
@@ -228,7 +228,7 @@ extension CustomColorScheme on ColorScheme {
Color get videoPlayerPrimaryColor => brightness == Brightness.light
? const Color.fromRGBO(0, 179, 60, 1)
: const Color.fromRGBO(1, 222, 77, 1);
-
+
Color get videoPlayerBorderColor => brightness == Brightness.light
? const Color(0xFF424242)
: const Color(0xFFFFFFFF);
diff --git a/mobile/apps/photos/lib/events/create_new_album_event.dart b/mobile/apps/photos/lib/events/create_new_album_event.dart
index 2dbf3b72fa..7444d8b7ad 100644
--- a/mobile/apps/photos/lib/events/create_new_album_event.dart
+++ b/mobile/apps/photos/lib/events/create_new_album_event.dart
@@ -5,4 +5,4 @@ class CreateNewAlbumEvent extends Event {
final Collection collection;
CreateNewAlbumEvent(this.collection);
-}
\ No newline at end of file
+}
diff --git a/mobile/apps/photos/lib/services/date_parse_service.dart b/mobile/apps/photos/lib/services/date_parse_service.dart
index 54a018158c..86a4b54896 100644
--- a/mobile/apps/photos/lib/services/date_parse_service.dart
+++ b/mobile/apps/photos/lib/services/date_parse_service.dart
@@ -110,7 +110,7 @@ class DateParseService {
result = _parseStructuredFormats(lowerInput);
if (!result.isEmpty) return result;
-
+
final normalized = _normalizeDateString(lowerInput);
result = _parseTokenizedDate(normalized);
@@ -203,7 +203,7 @@ class DateParseService {
}
return PartialDate.empty;
}
-
+
match = _standardFormatRegex.firstMatch(cleanInput);
if (match != null) {
final p1 = int.parse(match.group(1)!);
diff --git a/mobile/apps/photos/lib/ui/account/password_entry_page.dart b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
index f56cdb279a..4eb5fab032 100644
--- a/mobile/apps/photos/lib/ui/account/password_entry_page.dart
+++ b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
@@ -344,7 +344,8 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
child: Text(
AppLocalizations.of(context).passwordStrength(
- passwordStrengthValue: passwordStrengthText,),
+ passwordStrengthValue: passwordStrengthText,
+ ),
style: TextStyle(
color: passwordStrengthColor,
),
diff --git a/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart b/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart
index b0b2c33e4b..251bbc1a31 100644
--- a/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart
@@ -14,7 +14,8 @@ class DeveloperSettingsWidget extends StatelessWidget {
padding: const EdgeInsets.only(bottom: 20),
child: Text(
AppLocalizations.of(context).customEndpoint(
- endpoint: "${endpointURI.host}:${endpointURI.port}",),
+ endpoint: "${endpointURI.host}:${endpointURI.port}",
+ ),
style: Theme.of(context).textTheme.bodySmall,
),
);
diff --git a/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart b/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart
index 839e4cb6cc..577f826805 100644
--- a/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart
@@ -283,7 +283,9 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {
: const SizedBox.shrink(),
Text(
AppLocalizations.of(context).availableStorageSpace(
- freeAmount: freeSpace, storageUnit: freeSpaceUnit,),
+ freeAmount: freeSpace,
+ storageUnit: freeSpaceUnit,
+ ),
style: getEnteTextTheme(context)
.mini
.copyWith(color: textFaintDark),
diff --git a/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart b/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
index f9f04a3da5..96c6e01d14 100644
--- a/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
+++ b/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
@@ -180,7 +180,8 @@ class _VerifyIdentifyDialogState extends State<VerifyIdentifyDialog> {
.shareMyVerificationID(verificationID: verificationID)
: AppLocalizations.of(context)
.shareTextConfirmOthersVerificationID(
- verificationID: verificationID,),
+ verificationID: verificationID,
+ ),
);
},
child: Container(
diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
index 3ce0df1849..805826b44d 100644
--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
@@ -366,7 +366,8 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
margin: const EdgeInsets.only(bottom: 24),
decoration: BoxDecoration(
color: isHovered
- ? colorScheme.warning400.withValues(alpha: 0.8)
+ ? colorScheme.warning400
+ .withValues(alpha: 0.8)
: Colors.white,
shape: BoxShape.circle,
),
diff --git a/mobile/apps/photos/lib/ui/tools/free_space_page.dart b/mobile/apps/photos/lib/ui/tools/free_space_page.dart
index d768eae36b..ec261a7cf6 100644
--- a/mobile/apps/photos/lib/ui/tools/free_space_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/free_space_page.dart
@@ -54,7 +54,9 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
? AppLocalizations.of(context)
.filesBackedUpInAlbum(count: count, formattedNumber: formattedCount)
: AppLocalizations.of(context).filesBackedUpFromDevice(
- count: count, formattedNumber: formattedCount,);
+ count: count,
+ formattedNumber: formattedCount,
+ );
final informationTextStyle = TextStyle(
fontSize: 14,
height: 1.3,
@@ -121,7 +123,9 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
Expanded(
child: Text(
AppLocalizations.of(context).freeUpSpaceSaving(
- count: count, formattedSize: formatBytes(status.size),),
+ count: count,
+ formattedSize: formatBytes(status.size),
+ ),
style: informationTextStyle,
),
),
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart b/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart
index 9a0a23c354..5a2548b872 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart
@@ -153,8 +153,9 @@ class _DeleteEmptyAlbumsState extends State<DeleteEmptyAlbums> {
.toString()
.padLeft(collections.length.toString().length, '0');
_deleteProgress.value = AppLocalizations.of(context).deleteProgress(
- currentlyDeleting: currentlyDeleting,
- totalCount: collections.length,);
+ currentlyDeleting: currentlyDeleting,
+ totalCount: collections.length,
+ );
try {
await CollectionsService.instance.trashEmptyCollection(
collections[i],
diff --git a/mobile/apps/photos/lib/ui/viewer/file/video_stream_change.dart b/mobile/apps/photos/lib/ui/viewer/file/video_stream_change.dart
index a99aaeede9..0b1248f63d 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/video_stream_change.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/video_stream_change.dart
@@ -47,15 +47,16 @@ class _VideoStreamChangeWidgetState extends State<VideoStreamChangeWidget> {
final status = event.status;
// Handle different states - will be false for different files or non-processing states
- final newProcessingState = widget.file.uploadedFileID == fileId && switch (status) {
- PreviewItemStatus.inQueue ||
- PreviewItemStatus.retry ||
- PreviewItemStatus.compressing ||
- PreviewItemStatus.uploading =>
- true,
- _ => false,
- };
-
+ final newProcessingState = widget.file.uploadedFileID == fileId &&
+ switch (status) {
+ PreviewItemStatus.inQueue ||
+ PreviewItemStatus.retry ||
+ PreviewItemStatus.compressing ||
+ PreviewItemStatus.uploading =>
+ true,
+ _ => false,
+ };
+
// Only update state if value changed
if (isCurrentlyProcessing != newProcessingState) {
isCurrentlyProcessing = newProcessingState;
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 57c827268b..e37293bbbd 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
@@ -224,7 +224,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
context,
AppLocalizations.of(context)
.typeOfGallerGallerytypeIsNotSupportedForRename(
- galleryType: "$galleryType",),
+ galleryType: "$galleryType",
+ ),
);
return;
diff --git a/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart b/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart
index 7379565cd4..0761b04866 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart
@@ -104,7 +104,8 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
return Center(
child: Text(
AppLocalizations.of(context).noSuggestionsForPerson(
- personName: widget.person.data.name,),
+ personName: widget.person.data.name,
+ ),
style: getEnteTextTheme(context).largeMuted,
),
);
diff --git a/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart b/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart
index efdcb8a5a9..989c2a09b1 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart
@@ -156,7 +156,9 @@ class _LinkContactToPersonSelectionPageState
title: context.l10n.linkPersonToEmail(email: emailToLink),
icon: Icons.info_outline,
body: context.l10n.linkPersonToEmailConfirmation(
- personName: personName, email: emailToLink,),
+ personName: personName,
+ email: emailToLink,
+ ),
isDismissible: true,
buttons: [
ButtonWidget(
diff --git a/mobile/apps/photos/lib/utils/local_settings.dart b/mobile/apps/photos/lib/utils/local_settings.dart
index 4eef3a32c5..d6bd933d53 100644
--- a/mobile/apps/photos/lib/utils/local_settings.dart
+++ b/mobile/apps/photos/lib/utils/local_settings.dart
@@ -42,7 +42,7 @@ class LocalSettings {
static const kCollectionViewType = "collection_view_type";
static const kCollectionSortDirection = "collection_sort_direction";
static const kShowLocalIDOverThumbnails = "show_local_id_over_thumbnails";
-
+
// Thumbnail queue configuration keys
static const kSmallQueueMaxConcurrent = "small_queue_max_concurrent";
static const kSmallQueueTimeout = "small_queue_timeout_seconds";
@@ -235,39 +235,41 @@ class LocalSettings {
}
// Thumbnail queue configuration - Small queue
- int get smallQueueMaxConcurrent => _prefs.getInt(kSmallQueueMaxConcurrent) ?? 15;
-
+ int get smallQueueMaxConcurrent =>
+ _prefs.getInt(kSmallQueueMaxConcurrent) ?? 15;
+
int get smallQueueTimeoutSeconds => _prefs.getInt(kSmallQueueTimeout) ?? 60;
-
+
int get smallQueueMaxSize => _prefs.getInt(kSmallQueueMaxSize) ?? 200;
-
+
Future<void> setSmallQueueMaxConcurrent(int value) async {
await _prefs.setInt(kSmallQueueMaxConcurrent, value);
}
-
+
Future<void> setSmallQueueTimeout(int seconds) async {
await _prefs.setInt(kSmallQueueTimeout, seconds);
}
-
+
Future<void> setSmallQueueMaxSize(int value) async {
await _prefs.setInt(kSmallQueueMaxSize, value);
}
// Thumbnail queue configuration - Large queue
- int get largeQueueMaxConcurrent => _prefs.getInt(kLargeQueueMaxConcurrent) ?? 5;
-
+ int get largeQueueMaxConcurrent =>
+ _prefs.getInt(kLargeQueueMaxConcurrent) ?? 5;
+
int get largeQueueTimeoutSeconds => _prefs.getInt(kLargeQueueTimeout) ?? 60;
-
+
int get largeQueueMaxSize => _prefs.getInt(kLargeQueueMaxSize) ?? 200;
-
+
Future<void> setLargeQueueMaxConcurrent(int value) async {
await _prefs.setInt(kLargeQueueMaxConcurrent, value);
}
-
+
Future<void> setLargeQueueTimeout(int seconds) async {
await _prefs.setInt(kLargeQueueTimeout, seconds);
}
-
+
Future<void> setLargeQueueMaxSize(int value) async {
await _prefs.setInt(kLargeQueueMaxSize, value);
}