@@ -43,9 +43,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
43
43
unreadMarker: const HSLColor .fromAHSL (1 , 227 , 0.78 , 0.59 ).toColor (),
44
44
45
45
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 ),
49
46
);
50
47
51
48
static final dark = MessageListTheme ._(
@@ -63,9 +60,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
63
60
unreadMarker: const HSLColor .fromAHSL (0.75 , 227 , 0.78 , 0.59 ).toColor (),
64
61
65
62
unreadMarkerGap: Colors .transparent,
66
-
67
- // TODO(design) this is ad-hoc and untested; is there a better color?
68
- unsubscribedStreamRecipientHeaderBg: const Color (0xff0a0a0a ),
69
63
);
70
64
71
65
MessageListTheme ._({
@@ -76,7 +70,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
76
70
required this .streamRecipientHeaderChevronRight,
77
71
required this .unreadMarker,
78
72
required this .unreadMarkerGap,
79
- required this .unsubscribedStreamRecipientHeaderBg,
80
73
});
81
74
82
75
/// The [MessageListTheme] from the context's active theme.
@@ -96,7 +89,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
96
89
final Color streamRecipientHeaderChevronRight;
97
90
final Color unreadMarker;
98
91
final Color unreadMarkerGap;
99
- final Color unsubscribedStreamRecipientHeaderBg;
100
92
101
93
@override
102
94
MessageListTheme copyWith ({
@@ -107,7 +99,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
107
99
Color ? streamRecipientHeaderChevronRight,
108
100
Color ? unreadMarker,
109
101
Color ? unreadMarkerGap,
110
- Color ? unsubscribedStreamRecipientHeaderBg,
111
102
}) {
112
103
return MessageListTheme ._(
113
104
bgMessageRegular: bgMessageRegular ?? this .bgMessageRegular,
@@ -117,7 +108,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
117
108
streamRecipientHeaderChevronRight: streamRecipientHeaderChevronRight ?? this .streamRecipientHeaderChevronRight,
118
109
unreadMarker: unreadMarker ?? this .unreadMarker,
119
110
unreadMarkerGap: unreadMarkerGap ?? this .unreadMarkerGap,
120
- unsubscribedStreamRecipientHeaderBg: unsubscribedStreamRecipientHeaderBg ?? this .unsubscribedStreamRecipientHeaderBg,
121
111
);
122
112
}
123
113
@@ -134,7 +124,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
134
124
streamRecipientHeaderChevronRight: Color .lerp (streamRecipientHeaderChevronRight, other.streamRecipientHeaderChevronRight, t)! ,
135
125
unreadMarker: Color .lerp (unreadMarker, other.unreadMarker, t)! ,
136
126
unreadMarkerGap: Color .lerp (unreadMarkerGap, other.unreadMarkerGap, t)! ,
137
- unsubscribedStreamRecipientHeaderBg: Color .lerp (unsubscribedStreamRecipientHeaderBg, other.unsubscribedStreamRecipientHeaderBg, t)! ,
138
127
);
139
128
}
140
129
}
@@ -225,9 +214,8 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
225
214
case ChannelNarrow (: final streamId):
226
215
case TopicNarrow (: final streamId):
227
216
final subscription = store.subscriptions[streamId];
228
- appBarBackgroundColor = subscription != null
229
- ? colorSwatchFor (context, subscription).barBackground
230
- : messageListTheme.unsubscribedStreamRecipientHeaderBg;
217
+ appBarBackgroundColor =
218
+ colorSwatchFor (context, subscription).barBackground;
231
219
// All recipient headers will match this color; remove distracting line
232
220
// (but are recipient headers even needed for topic narrows?)
233
221
removeAppBarBottomBorder = true ;
@@ -1091,24 +1079,15 @@ class StreamMessageRecipientHeader extends StatelessWidget {
1091
1079
// https://github.com/zulip/zulip-mobile/issues/5511
1092
1080
final store = PerAccountStoreWidget .of (context);
1093
1081
final designVariables = DesignVariables .of (context);
1082
+ final messageListTheme = MessageListTheme .of (context);
1094
1083
final zulipLocalizations = ZulipLocalizations .of (context);
1095
1084
1096
1085
final streamId = message.conversation.streamId;
1097
1086
final topic = message.conversation.topic;
1098
1087
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;
1112
1091
1113
1092
final Widget streamWidget;
1114
1093
if (! _containsDifferentChannels (narrow)) {
0 commit comments