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