Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Add longer slideshow durations (#12903)

Aman Rajf3eda1103f65
diff --git a/mobile/apps/photos/changes/slideshow-durations.md b/mobile/apps/photos/changes/slideshow-durations.md
new file mode 100644
index 0000000000..f689ff6ea3
--- /dev/null
+++ b/mobile/apps/photos/changes/slideshow-durations.md
@@ -0,0 +1 @@
+- Added longer slideshow duration options.
diff --git a/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart b/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart
index 6bfc2fab20..e84e23413f 100644
--- a/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart
@@ -22,7 +22,7 @@ import "package:photos/services/wake_lock_service.dart";
import "package:photos/ui/viewer/file/file_widget.dart";
import "package:photos/ui/viewer/file/thumbnail_widget.dart";
-const _albumSlideshowDurationOptions = [5, 10, 15, 30];
+const _albumSlideshowDurationOptions = [5, 10, 15, 30, 60, 300, 600];
class AlbumSlideshowPage extends StatefulWidget {
AlbumSlideshowPage({required this.files, required this.title, super.key}) {
@@ -631,7 +631,11 @@ class _AlbumSlideshowSettingsSheetState
children: [
for (final seconds in _albumSlideshowDurationOptions)
_buildChip(
- label: context.strings.secondsCount(count: seconds),
+ label: seconds < Duration.secondsPerMinute
+ ? context.strings.secondsCountShort(count: seconds)
+ : context.strings.minutesCountShort(
+ count: seconds ~/ Duration.secondsPerMinute,
+ ),
selected: seconds == _durationSeconds,
onTap: () {
if (seconds == _durationSeconds) return;
diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arb
index a4aa3b0fe6..ae0d0eb19b 100644
--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb
+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb
@@ -2582,6 +2582,15 @@
"message": "Message",
"minimizeAppOnCopy": "Minimize app on copy",
"minimizeToTrayOnClose": "Minimize to tray on close",
+ "minutesCountShort": "{count}m",
+ "@minutesCountShort": {
+ "placeholders": {
+ "count": {
+ "type": "int",
+ "example": "5"
+ }
+ }
+ },
"mixedGrouping": "Mixed grouping?",
"mlConsent": "Enable machine learning",
"mlConsentConfirmation": "I understand, and wish to enable machine learning",
@@ -3815,6 +3824,15 @@
}
}
},
+ "secondsCountShort": "{count}s",
+ "@secondsCountShort": {
+ "placeholders": {
+ "count": {
+ "type": "int",
+ "example": "5"
+ }
+ }
+ },
"secret": "Secret",
"secretCanNotBeEmpty": "Secret can not be empty",
"security": "Security",