@@ -612,13 +612,7 @@ class InboxTopicItem extends StatelessWidget {
612612 // this Align shrink-wraps to its child's height.)
613613 alignment: .centerEnd,
614614 child: topic.isResolved
615- ? InlineIcon (
616- // Compare icon style in the topic list; probably these
617- // should stay in sync.
618- icon: ZulipIcons .check,
619- fontSize: InboxRowTrailingMarkers .fontSize,
620- textScaler: MediaQuery .textScalerOf (context).clamp (maxScaleFactor: 1.5 ),
621- color: DesignVariables .of (context).textMessage.withFadedAlpha (0.4 ))
615+ ? InboxRowMarkerIcon (icon: ZulipIcons .check)
622616 : null )),
623617 SizedBox (width: 8 ),
624618 Expanded (child: Padding (
@@ -649,6 +643,38 @@ class InboxTopicItem extends StatelessWidget {
649643 }
650644}
651645
646+ /// An [InlineIcon] styled for use as a marker in inbox rows.
647+ ///
648+ /// This encapsulates style details that should stay in sync
649+ /// across the inbox and topic-list pages.
650+ class InboxRowMarkerIcon extends StatelessWidget {
651+ const InboxRowMarkerIcon ({
652+ super .key,
653+ required this .icon,
654+ this .visible = true ,
655+ this .padBefore = false ,
656+ this .padAfter = false ,
657+ });
658+
659+ final IconData icon;
660+ final bool visible;
661+ final bool padBefore;
662+ final bool padAfter;
663+
664+ @override
665+ Widget build (BuildContext context) {
666+ return InlineIcon (
667+ icon: icon,
668+ fontSize: InboxRowTrailingMarkers .fontSize,
669+ textScaler: MediaQuery .textScalerOf (context).clamp (maxScaleFactor: 1.5 ),
670+ color: DesignVariables .of (context).textMessage.withFadedAlpha (0.4 ),
671+ visible: visible,
672+ padBefore: padBefore,
673+ padAfter: padAfter,
674+ );
675+ }
676+ }
677+
652678/// A short, baseline-aligned row, optionally containing
653679/// an unread badge, @ icon, and topic visibility icon.
654680///
@@ -670,13 +696,7 @@ class InboxRowTrailingMarkers extends StatelessWidget {
670696 static const fontSize = 17.0 ;
671697
672698 Widget _buildIcon (BuildContext context, IconData icon, {required bool padAfter}) {
673- return InlineIcon (
674- icon: icon,
675- fontSize: fontSize,
676- textScaler: MediaQuery .textScalerOf (context).clamp (maxScaleFactor: 1.5 ),
677- color: DesignVariables .of (context).textMessage.withFadedAlpha (0.4 ),
678- padAfter: padAfter,
679- );
699+ return InboxRowMarkerIcon (icon: icon, padAfter: padAfter);
680700 }
681701
682702 @override
0 commit comments