@@ -529,6 +529,7 @@ class MessageListAppBarTitle extends StatelessWidget {
529529 ZulipStream ? stream,
530530 }) {
531531 final store = PerAccountStoreWidget .of (context);
532+ final designVariables = DesignVariables .of (context);
532533 final zulipLocalizations = ZulipLocalizations .of (context);
533534
534535 // A null [Icon.icon] makes a blank space.
@@ -547,10 +548,21 @@ class MessageListAppBarTitle extends StatelessWidget {
547548 // https://github.com/zulip/zulip-flutter/pull/219#discussion_r1281024746
548549 crossAxisAlignment: CrossAxisAlignment .center,
549550 children: [
550- Icon (size: 16 , color: iconColor, icon),
551- const SizedBox (width: 4 ),
552- Flexible (child: Text (
553- stream? .name ?? zulipLocalizations.unknownChannelName)),
551+ if (stream != null )
552+ Flexible (child: Text .rich (
553+ channelTopicLabelSpan (
554+ context: context,
555+ channelId: stream.streamId,
556+ fontSize: 16 ,
557+ color: designVariables.unreadCountBadgeTextForChannel,
558+ )))
559+ else
560+ Flexible (child: Text (
561+ zulipLocalizations.unknownChannelName,
562+ style: TextStyle (
563+ fontStyle: FontStyle .italic,
564+ color: designVariables.unreadCountBadgeTextForChannel,
565+ ))),
554566 ]);
555567 }
556568
@@ -1719,22 +1731,29 @@ class StreamMessageRecipientHeader extends StatelessWidget {
17191731 child: Row (
17201732 crossAxisAlignment: CrossAxisAlignment .center,
17211733 children: [
1722- Padding (
1723- // Figma specifies 5px horizontal spacing around an icon that's
1724- // 18x18 and includes 1px padding. The icon SVG is flush with
1725- // the edges, so make it 16x16 with 6px horizontal padding.
1726- // Bottom padding added here to shift icon up to
1727- // match alignment with text visually.
1728- padding: const EdgeInsets .only (left: 6 , right: 6 , bottom: 3 ),
1729- child: Icon (size: 16 , color: iconColor,
1730- // A null [Icon.icon] makes a blank space.
1731- stream != null ? iconDataForStream (stream) : null )),
1732- Padding (
1733- padding: const EdgeInsets .symmetric (vertical: 11 ),
1734- child: Text (streamName,
1735- style: recipientHeaderTextStyle (context),
1736- overflow: TextOverflow .ellipsis),
1737- ),
1734+ if (stream != null )
1735+ Padding (
1736+ padding: const EdgeInsets .symmetric (vertical: 11 ),
1737+ child: Text .rich (
1738+ channelTopicLabelSpan (
1739+ context: context,
1740+ channelId: streamId,
1741+ fontSize: 16 ,
1742+ color: designVariables.unreadCountBadgeTextForChannel,
1743+ ),
1744+ style: recipientHeaderTextStyle (context),
1745+ overflow: TextOverflow .ellipsis),
1746+ )
1747+ else
1748+ Padding (
1749+ padding: const EdgeInsets .symmetric (vertical: 11 ),
1750+ child: Text (streamName,
1751+ style: recipientHeaderTextStyle (context).copyWith (
1752+ fontStyle: FontStyle .italic,
1753+ color: designVariables.unreadCountBadgeTextForChannel,
1754+ ),
1755+ overflow: TextOverflow .ellipsis),
1756+ ),
17381757 Padding (
17391758 // Figma has 5px horizontal padding around an 8px wide icon.
17401759 // Icon is 16px wide here so horizontal padding is 1px.
0 commit comments