@@ -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;
@@ -1045,24 +1033,15 @@ class StreamMessageRecipientHeader extends StatelessWidget {
1045
1033
// https://github.com/zulip/zulip-mobile/issues/5511
1046
1034
final store = PerAccountStoreWidget.of(context);
1047
1035
final designVariables = DesignVariables.of(context);
1036
+ final messageListTheme = MessageListTheme.of(context);
1048
1037
final zulipLocalizations = ZulipLocalizations.of(context);
1049
1038
1050
1039
final streamId = message.conversation.streamId;
1051
1040
final topic = message.conversation.topic;
1052
1041
1053
- final messageListTheme = MessageListTheme.of(context);
1054
-
1055
- final subscription = store.subscriptions[streamId];
1056
- final Color backgroundColor;
1057
- final Color iconColor;
1058
- if (subscription != null) {
1059
- final swatch = colorSwatchFor(context, subscription);
1060
- backgroundColor = swatch.barBackground;
1061
- iconColor = swatch.iconOnBarBackground;
1062
- } else {
1063
- backgroundColor = messageListTheme.unsubscribedStreamRecipientHeaderBg;
1064
- iconColor = designVariables.title;
1065
- }
1042
+ final swatch = colorSwatchFor(context, store.subscriptions[streamId]);
1043
+ final backgroundColor = swatch.barBackground;
1044
+ final iconColor = swatch.iconOnBarBackground;
1066
1045
1067
1046
final Widget streamWidget;
1068
1047
if (!_containsDifferentChannels(narrow)) {
0 commit comments