@@ -43,9 +43,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
4343 unreadMarker: const HSLColor .fromAHSL (1 , 227 , 0.78 , 0.59 ).toColor (),
4444
4545 unreadMarkerGap: Colors .white.withValues (alpha: 0.6 ),
46-
47- // TODO(design) this seems ad-hoc; is there a better color?
48- unsubscribedStreamRecipientHeaderBg: const Color (0xfff5f5f5 ),
4946 );
5047
5148 static final dark = MessageListTheme ._(
@@ -63,9 +60,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
6360 unreadMarker: const HSLColor .fromAHSL (0.75 , 227 , 0.78 , 0.59 ).toColor (),
6461
6562 unreadMarkerGap: Colors .transparent,
66-
67- // TODO(design) this is ad-hoc and untested; is there a better color?
68- unsubscribedStreamRecipientHeaderBg: const Color (0xff0a0a0a ),
6963 );
7064
7165 MessageListTheme ._({
@@ -76,7 +70,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
7670 required this .streamRecipientHeaderChevronRight,
7771 required this .unreadMarker,
7872 required this .unreadMarkerGap,
79- required this .unsubscribedStreamRecipientHeaderBg,
8073 });
8174
8275 /// The [MessageListTheme] from the context's active theme.
@@ -96,7 +89,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
9689 final Color streamRecipientHeaderChevronRight;
9790 final Color unreadMarker;
9891 final Color unreadMarkerGap;
99- final Color unsubscribedStreamRecipientHeaderBg;
10092
10193 @override
10294 MessageListTheme copyWith ({
@@ -107,7 +99,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
10799 Color ? streamRecipientHeaderChevronRight,
108100 Color ? unreadMarker,
109101 Color ? unreadMarkerGap,
110- Color ? unsubscribedStreamRecipientHeaderBg,
111102 }) {
112103 return MessageListTheme ._(
113104 bgMessageRegular: bgMessageRegular ?? this .bgMessageRegular,
@@ -117,7 +108,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
117108 streamRecipientHeaderChevronRight: streamRecipientHeaderChevronRight ?? this .streamRecipientHeaderChevronRight,
118109 unreadMarker: unreadMarker ?? this .unreadMarker,
119110 unreadMarkerGap: unreadMarkerGap ?? this .unreadMarkerGap,
120- unsubscribedStreamRecipientHeaderBg: unsubscribedStreamRecipientHeaderBg ?? this .unsubscribedStreamRecipientHeaderBg,
121111 );
122112 }
123113
@@ -134,7 +124,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
134124 streamRecipientHeaderChevronRight: Color .lerp (streamRecipientHeaderChevronRight, other.streamRecipientHeaderChevronRight, t)! ,
135125 unreadMarker: Color .lerp (unreadMarker, other.unreadMarker, t)! ,
136126 unreadMarkerGap: Color .lerp (unreadMarkerGap, other.unreadMarkerGap, t)! ,
137- unsubscribedStreamRecipientHeaderBg: Color .lerp (unsubscribedStreamRecipientHeaderBg, other.unsubscribedStreamRecipientHeaderBg, t)! ,
138127 );
139128 }
140129}
@@ -225,9 +214,8 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
225214 case ChannelNarrow (: final streamId):
226215 case TopicNarrow (: final streamId):
227216 final subscription = store.subscriptions[streamId];
228- appBarBackgroundColor = subscription != null
229- ? colorSwatchFor (context, subscription).barBackground
230- : messageListTheme.unsubscribedStreamRecipientHeaderBg;
217+ appBarBackgroundColor =
218+ colorSwatchFor (context, subscription).barBackground;
231219 // All recipient headers will match this color; remove distracting line
232220 // (but are recipient headers even needed for topic narrows?)
233221 removeAppBarBottomBorder = true ;
@@ -1091,24 +1079,15 @@ class StreamMessageRecipientHeader extends StatelessWidget {
10911079 // https://github.com/zulip/zulip-mobile/issues/5511
10921080 final store = PerAccountStoreWidget .of (context);
10931081 final designVariables = DesignVariables .of (context);
1082+ final messageListTheme = MessageListTheme .of (context);
10941083 final zulipLocalizations = ZulipLocalizations .of (context);
10951084
10961085 final streamId = message.conversation.streamId;
10971086 final topic = message.conversation.topic;
10981087
1099- final messageListTheme = MessageListTheme .of (context);
1100-
1101- final subscription = store.subscriptions[streamId];
1102- final Color backgroundColor;
1103- final Color iconColor;
1104- if (subscription != null ) {
1105- final swatch = colorSwatchFor (context, subscription);
1106- backgroundColor = swatch.barBackground;
1107- iconColor = swatch.iconOnBarBackground;
1108- } else {
1109- backgroundColor = messageListTheme.unsubscribedStreamRecipientHeaderBg;
1110- iconColor = designVariables.title;
1111- }
1088+ final swatch = colorSwatchFor (context, store.subscriptions[streamId]);
1089+ final backgroundColor = swatch.barBackground;
1090+ final iconColor = swatch.iconOnBarBackground;
11121091
11131092 final Widget streamWidget;
11141093 if (! _containsDifferentChannels (narrow)) {
0 commit comments