Skip to content

armgit / ente

Public Imported from GitHub
0

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

Extract overlay dismissed check to getter

ashilkn677fa5d06c31
diff --git a/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart
index dac2345dbc..13e5049db0 100644
--- a/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart
+++ b/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart
@@ -68,6 +68,9 @@ class _CommentBubbleWidgetState extends State<CommentBubbleWidget>
late final StreamSubscription<CommentDeletedEvent>
_commentDeletedSubscription;
+ bool get _isOverlayDismissed =>
+ _overlayAnimationController.status == AnimationStatus.dismissed;
+
@override
void initState() {
super.initState();
@@ -200,10 +203,7 @@ class _CommentBubbleWidgetState extends State<CommentBubbleWidget>
key: _contentKey,
child: _buildCommentContent(
showActionsCapsule: true,
- capsuleOpacity: _overlayAnimationController.status ==
- AnimationStatus.dismissed
- ? 1.0
- : 0.0,
+ capsuleOpacity: _isOverlayDismissed ? 1.0 : 0.0,
),
),
),