Skip to content

armgit / ente

Public Imported from GitHub
0

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

Simplify exposure time formatting: always convert fractions to 1/x format

copilot-swe-agent[bot]3de04b312f5e
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart
index 285d239bc4..c1e212da7d 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart
@@ -448,11 +448,9 @@ class _FileDetailsWidgetState extends State<FileDetailsWidget> {
return "${seconds.toInt()}s";
}
return "${seconds.toStringAsFixed(1)}s";
- } else if (numerator == 1) {
- // If the fraction already has numerator 1, use it directly (e.g., 1/100)
- return "$numerator/$denominator";
} else {
- // For other fractions, calculate and display as 1/x
+ // For exposures < 1 second, always convert to 1/x format
+ // e.g., 529/200000 β†’ 1/378
final reciprocal = (1 / seconds).round();
return "1/$reciprocal";
}