π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update UI state immediately after comment deletion
ashilkn6c9ca0a5da4b
diff --git a/mobile/apps/photos/lib/ui/social/comments_screen.dart b/mobile/apps/photos/lib/ui/social/comments_screen.dartindex b944f3de2c..23599a69cb 100644--- a/mobile/apps/photos/lib/ui/social/comments_screen.dart+++ b/mobile/apps/photos/lib/ui/social/comments_screen.dart@@ -180,6 +180,12 @@ class _CommentsScreenState extends State<CommentsScreen> {await SocialDataProvider.instance.addComment(newComment);}+ void _handleCommentDeleted(String commentId) {+ setState(() {+ _comments.removeWhere((c) => c.id == commentId);+ });+ }+@overrideWidget build(BuildContext context) {final colorScheme = getEnteColorScheme(context);@@ -246,6 +252,8 @@ class _CommentsScreenState extends State<CommentsScreen> {_getReactionsForComment(comment.id),onReplyTap: () => _onReplyTap(comment),userResolver: _getUserForComment,+ onCommentDeleted: () =>+ _handleCommentDeleted(comment.id),);},),