@@ -198,8 +198,11 @@ class _SubscriptionList extends StatelessWidget {
198
198
final hasOnlyMutedMentions = ! subscription.isMuted
199
199
&& channelsWithMentions.contains (subscription.streamId)
200
200
&& ! channelsWithUnmutedMentions.contains (subscription.streamId);
201
+ final mutedUnreadCount = hasOnlyMutedMentions && unreadCount == 0 ?
202
+ unreadsModel! .countAll (subscription.streamId) : 0 ;
201
203
return SubscriptionItem (subscription: subscription,
202
204
unreadCount: unreadCount,
205
+ mutedUnreadCount: mutedUnreadCount,
203
206
showMutedUnreadBadge: showMutedUnreadBadge,
204
207
hasMentions: hasMentions,
205
208
hasOnlyMutedMentions: hasOnlyMutedMentions);
@@ -213,13 +216,15 @@ class SubscriptionItem extends StatelessWidget {
213
216
super .key,
214
217
required this .subscription,
215
218
required this .unreadCount,
219
+ required this .mutedUnreadCount,
216
220
required this .showMutedUnreadBadge,
217
221
required this .hasMentions,
218
222
required this .hasOnlyMutedMentions,
219
223
});
220
224
221
225
final Subscription subscription;
222
226
final int unreadCount;
227
+ final int mutedUnreadCount;
223
228
final bool showMutedUnreadBadge;
224
229
final bool hasMentions;
225
230
final bool hasOnlyMutedMentions;
@@ -230,7 +235,8 @@ class SubscriptionItem extends StatelessWidget {
230
235
231
236
final swatch = colorSwatchFor (context, subscription);
232
237
final hasUnreads = (unreadCount > 0 );
233
- final opacity = subscription.isMuted ? 0.55 : 1.0 ;
238
+ const mutedOpacity = 0.55 ;
239
+ final opacity = subscription.isMuted ? mutedOpacity : 1.0 ;
234
240
return Material (
235
241
// TODO(design) check if this is the right variable
236
242
color: designVariables.background,
@@ -277,6 +283,15 @@ class SubscriptionItem extends StatelessWidget {
277
283
count: unreadCount,
278
284
backgroundColor: swatch,
279
285
bold: true )),
286
+ ] else if (hasOnlyMutedMentions && ! subscription.isMuted) ...[
287
+ const SizedBox (width: 12 ),
288
+ const AtMentionMarker (muted: true ),
289
+ Opacity (
290
+ opacity: mutedOpacity,
291
+ child: UnreadCountBadge (
292
+ count: mutedUnreadCount,
293
+ backgroundColor: swatch,
294
+ bold: true )),
280
295
] else if (showMutedUnreadBadge) ...[
281
296
const SizedBox (width: 12 ),
282
297
if (hasMentions) const AtMentionMarker (muted: true ),
0 commit comments