Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Scroll to new comment after posting

Claude2160681ad963
diff --git a/mobile/apps/photos/lib/ui/social/comments_screen.dart b/mobile/apps/photos/lib/ui/social/comments_screen.dart
index aea30f0d67..61f8f71e1e 100644
--- a/mobile/apps/photos/lib/ui/social/comments_screen.dart
+++ b/mobile/apps/photos/lib/ui/social/comments_screen.dart
@@ -540,6 +540,15 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {
}
});
_textController.clear();
+
+ // Scroll to the newly added comment (position 0 in reversed list)
+ if (_scrollController.hasClients) {
+ _scrollController.animateTo(
+ 0,
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeOut,
+ );
+ }
}
} catch (e) {
_sendLoadingTimer?.cancel();