@@ -46,9 +46,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
46
46
unreadMarker: const HSLColor .fromAHSL (1 , 227 , 0.78 , 0.59 ).toColor (),
47
47
48
48
unreadMarkerGap: Colors .white.withValues (alpha: 0.6 ),
49
-
50
- // TODO(design) this seems ad-hoc; is there a better color?
51
- unsubscribedStreamRecipientHeaderBg: const Color (0xfff5f5f5 ),
52
49
);
53
50
54
51
static final dark = MessageListTheme ._(
@@ -66,9 +63,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
66
63
unreadMarker: const HSLColor .fromAHSL (0.75 , 227 , 0.78 , 0.59 ).toColor (),
67
64
68
65
unreadMarkerGap: Colors .transparent,
69
-
70
- // TODO(design) this is ad-hoc and untested; is there a better color?
71
- unsubscribedStreamRecipientHeaderBg: const Color (0xff0a0a0a ),
72
66
);
73
67
74
68
MessageListTheme ._({
@@ -79,7 +73,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
79
73
required this .streamRecipientHeaderChevronRight,
80
74
required this .unreadMarker,
81
75
required this .unreadMarkerGap,
82
- required this .unsubscribedStreamRecipientHeaderBg,
83
76
});
84
77
85
78
/// The [MessageListTheme] from the context's active theme.
@@ -99,7 +92,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
99
92
final Color streamRecipientHeaderChevronRight;
100
93
final Color unreadMarker;
101
94
final Color unreadMarkerGap;
102
- final Color unsubscribedStreamRecipientHeaderBg;
103
95
104
96
@override
105
97
MessageListTheme copyWith ({
@@ -110,7 +102,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
110
102
Color ? streamRecipientHeaderChevronRight,
111
103
Color ? unreadMarker,
112
104
Color ? unreadMarkerGap,
113
- Color ? unsubscribedStreamRecipientHeaderBg,
114
105
}) {
115
106
return MessageListTheme ._(
116
107
bgMessageRegular: bgMessageRegular ?? this .bgMessageRegular,
@@ -120,7 +111,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
120
111
streamRecipientHeaderChevronRight: streamRecipientHeaderChevronRight ?? this .streamRecipientHeaderChevronRight,
121
112
unreadMarker: unreadMarker ?? this .unreadMarker,
122
113
unreadMarkerGap: unreadMarkerGap ?? this .unreadMarkerGap,
123
- unsubscribedStreamRecipientHeaderBg: unsubscribedStreamRecipientHeaderBg ?? this .unsubscribedStreamRecipientHeaderBg,
124
114
);
125
115
}
126
116
@@ -137,7 +127,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
137
127
streamRecipientHeaderChevronRight: Color .lerp (streamRecipientHeaderChevronRight, other.streamRecipientHeaderChevronRight, t)! ,
138
128
unreadMarker: Color .lerp (unreadMarker, other.unreadMarker, t)! ,
139
129
unreadMarkerGap: Color .lerp (unreadMarkerGap, other.unreadMarkerGap, t)! ,
140
- unsubscribedStreamRecipientHeaderBg: Color .lerp (unsubscribedStreamRecipientHeaderBg, other.unsubscribedStreamRecipientHeaderBg, t)! ,
141
130
);
142
131
}
143
132
}
@@ -228,9 +217,8 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
228
217
case ChannelNarrow (: final streamId):
229
218
case TopicNarrow (: final streamId):
230
219
final subscription = store.subscriptions[streamId];
231
- appBarBackgroundColor = subscription != null
232
- ? colorSwatchFor (context, subscription).barBackground
233
- : messageListTheme.unsubscribedStreamRecipientHeaderBg;
220
+ appBarBackgroundColor =
221
+ colorSwatchFor (context, subscription).barBackground;
234
222
// All recipient headers will match this color; remove distracting line
235
223
// (but are recipient headers even needed for topic narrows?)
236
224
removeAppBarBottomBorder = true ;
@@ -1054,24 +1042,15 @@ class StreamMessageRecipientHeader extends StatelessWidget {
1054
1042
// https://github.com/zulip/zulip-mobile/issues/5511
1055
1043
final store = PerAccountStoreWidget .of (context);
1056
1044
final designVariables = DesignVariables .of (context);
1045
+ final messageListTheme = MessageListTheme .of (context);
1057
1046
final zulipLocalizations = ZulipLocalizations .of (context);
1058
1047
1059
1048
final streamId = message.conversation.streamId;
1060
1049
final topic = message.conversation.topic;
1061
1050
1062
- final messageListTheme = MessageListTheme .of (context);
1063
-
1064
- final subscription = store.subscriptions[streamId];
1065
- final Color backgroundColor;
1066
- final Color iconColor;
1067
- if (subscription != null ) {
1068
- final swatch = colorSwatchFor (context, subscription);
1069
- backgroundColor = swatch.barBackground;
1070
- iconColor = swatch.iconOnBarBackground;
1071
- } else {
1072
- backgroundColor = messageListTheme.unsubscribedStreamRecipientHeaderBg;
1073
- iconColor = designVariables.title;
1074
- }
1051
+ final swatch = colorSwatchFor (context, store.subscriptions[streamId]);
1052
+ final backgroundColor = swatch.barBackground;
1053
+ final iconColor = swatch.iconOnBarBackground;
1075
1054
1076
1055
final Widget streamWidget;
1077
1056
if (! _containsDifferentChannels (narrow)) {
0 commit comments