File tree 1 file changed +15
-9
lines changed
1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -631,15 +631,21 @@ class _AnimatedUnread extends StatelessWidget {
631
631
632
632
@override
633
633
Widget build (BuildContext context) {
634
- return AnimatedOpacity (
635
- opacity: isRead ? 0 : 1 ,
636
- // Web uses 2s and 0.3s durations, and a CSS ease-out curve.
637
- // See zulip:web/styles/message_row.css .
638
- // As of now we wait for the ack from the server
639
- // so we're going with 0.1s as soon as the ack is received.
640
- duration: Duration (milliseconds: isRead ? 100 : 300 ),
641
- curve: Curves .easeOut,
642
- child: child);
634
+ final duration = Duration (milliseconds: isRead ? 100 : 300 );
635
+ final visibility = isRead ? 0.0 : 1.0 ;
636
+ return AnimatedScale (
637
+ scale: visibility,
638
+ duration: duration,
639
+ child: AnimatedOpacity (
640
+ opacity: visibility,
641
+ // Web uses 2s and 0.3s durations, and a CSS ease-out curve.
642
+ // See zulip:web/styles/message_row.css .
643
+ // As of now we wait for the ack from the server
644
+ // so we're going with 0.1s as soon as the ack is received.
645
+ duration: duration,
646
+ curve: Curves .easeOut,
647
+ child: child),
648
+ );
643
649
}
644
650
}
645
651
You can’t perform that action at this time.
0 commit comments