Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Format responsive filmstrip layout

ashil-pilota29ad8e6e683
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_viewer_filmstrip.dart b/mobile/apps/photos/lib/ui/viewer/file/file_viewer_filmstrip.dart
index 1ac63e763e..e1b3b03913 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_viewer_filmstrip.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_viewer_filmstrip.dart
@@ -69,10 +69,8 @@ class FileViewerFilmstripLayout {
const _cacheExtentInItems = 4;
const _scrollAnimationDuration = Duration(milliseconds: 180);
-typedef FileViewerFilmstripSemanticValueBuilder = String Function(
- int current,
- int total,
-);
+typedef FileViewerFilmstripSemanticValueBuilder =
+ String Function(int current, int total);
class FileViewerFilmstrip extends StatefulWidget {
final int itemCount;
@@ -391,8 +389,9 @@ class _FileViewerFilmstripState extends State<FileViewerFilmstrip> {
void _jumpToIndex(int index) {
if (widget.itemCount == 0 || !_scrollController.hasClients) return;
final position = _scrollController.position;
- final target = _offsetForIndex(_clampIndex(index))
- .clamp(position.minScrollExtent, position.maxScrollExtent);
+ final target = _offsetForIndex(
+ _clampIndex(index),
+ ).clamp(position.minScrollExtent, position.maxScrollExtent);
if ((position.pixels - target).abs() < 0.5) return;
_scrollController.jumpTo(target);
}
@@ -400,8 +399,9 @@ class _FileViewerFilmstripState extends State<FileViewerFilmstrip> {
void _animateToIndex(int index) {
if (widget.itemCount == 0 || !_scrollController.hasClients) return;
final position = _scrollController.position;
- final target = _offsetForIndex(_clampIndex(index))
- .clamp(position.minScrollExtent, position.maxScrollExtent);
+ final target = _offsetForIndex(
+ _clampIndex(index),
+ ).clamp(position.minScrollExtent, position.maxScrollExtent);
if ((position.pixels - target).abs() < 0.5) return;
unawaited(
_scrollController.animateTo(