@@ -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 ._(
@@ -64,9 +61,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
64
61
unreadMarker: const HSLColor .fromAHSL (0.75 , 227 , 0.78 , 0.59 ).toColor (),
65
62
66
63
unreadMarkerGap: Colors .transparent,
67
-
68
- // TODO(design) this is ad-hoc and untested; is there a better color?
69
- unsubscribedStreamRecipientHeaderBg: const Color (0xff0a0a0a ),
70
64
);
71
65
72
66
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.
@@ -95,7 +88,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
95
88
final Color streamRecipientHeaderChevronRight;
96
89
final Color unreadMarker;
97
90
final Color unreadMarkerGap;
98
- final Color unsubscribedStreamRecipientHeaderBg;
99
91
100
92
@override
101
93
MessageListTheme copyWith ({
@@ -105,7 +97,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
105
97
Color ? streamRecipientHeaderChevronRight,
106
98
Color ? unreadMarker,
107
99
Color ? unreadMarkerGap,
108
- Color ? unsubscribedStreamRecipientHeaderBg,
109
100
}) {
110
101
return MessageListTheme ._(
111
102
dmRecipientHeaderBg: dmRecipientHeaderBg ?? this .dmRecipientHeaderBg,
@@ -114,7 +105,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
114
105
streamRecipientHeaderChevronRight: streamRecipientHeaderChevronRight ?? this .streamRecipientHeaderChevronRight,
115
106
unreadMarker: unreadMarker ?? this .unreadMarker,
116
107
unreadMarkerGap: unreadMarkerGap ?? this .unreadMarkerGap,
117
- unsubscribedStreamRecipientHeaderBg: unsubscribedStreamRecipientHeaderBg ?? this .unsubscribedStreamRecipientHeaderBg,
118
108
);
119
109
}
120
110
@@ -130,7 +120,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
130
120
streamRecipientHeaderChevronRight: Color .lerp (streamRecipientHeaderChevronRight, other.streamRecipientHeaderChevronRight, t)! ,
131
121
unreadMarker: Color .lerp (unreadMarker, other.unreadMarker, t)! ,
132
122
unreadMarkerGap: Color .lerp (unreadMarkerGap, other.unreadMarkerGap, t)! ,
133
- unsubscribedStreamRecipientHeaderBg: Color .lerp (unsubscribedStreamRecipientHeaderBg, other.unsubscribedStreamRecipientHeaderBg, t)! ,
134
123
);
135
124
}
136
125
}
@@ -221,9 +210,8 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
221
210
case ChannelNarrow (: final streamId):
222
211
case TopicNarrow (: final streamId):
223
212
final subscription = store.subscriptions[streamId];
224
- appBarBackgroundColor = subscription != null
225
- ? colorSwatchFor (context, subscription).barBackground
226
- : messageListTheme.unsubscribedStreamRecipientHeaderBg;
213
+ appBarBackgroundColor =
214
+ colorSwatchFor (context, subscription).barBackground;
227
215
// All recipient headers will match this color; remove distracting line
228
216
// (but are recipient headers even needed for topic narrows?)
229
217
removeAppBarBottomBorder = true ;
@@ -1046,24 +1034,15 @@ class StreamMessageRecipientHeader extends StatelessWidget {
1046
1034
// https://github.com/zulip/zulip-mobile/issues/5511
1047
1035
final store = PerAccountStoreWidget .of (context);
1048
1036
final designVariables = DesignVariables .of (context);
1037
+ final messageListTheme = MessageListTheme .of (context);
1049
1038
final zulipLocalizations = ZulipLocalizations .of (context);
1050
1039
1051
1040
final streamId = message.conversation.streamId;
1052
1041
final topic = message.conversation.topic;
1053
1042
1054
- final messageListTheme = MessageListTheme .of (context);
1055
-
1056
- final subscription = store.subscriptions[streamId];
1057
- final Color backgroundColor;
1058
- final Color iconColor;
1059
- if (subscription != null ) {
1060
- final swatch = colorSwatchFor (context, subscription);
1061
- backgroundColor = swatch.barBackground;
1062
- iconColor = swatch.iconOnBarBackground;
1063
- } else {
1064
- backgroundColor = messageListTheme.unsubscribedStreamRecipientHeaderBg;
1065
- iconColor = designVariables.title;
1066
- }
1043
+ final swatch = colorSwatchFor (context, store.subscriptions[streamId]);
1044
+ final backgroundColor = swatch.barBackground;
1045
+ final iconColor = swatch.iconOnBarBackground;
1067
1046
1068
1047
final Widget streamWidget;
1069
1048
if (! _containsDifferentChannels (narrow)) {
0 commit comments