@@ -222,6 +222,7 @@ abstract class _HeaderItem extends StatelessWidget {
222
222
final _InboxPageState pageState;
223
223
final int count;
224
224
final bool hasMention;
225
+ final bool isArchived;
225
226
226
227
/// A build context within the [_StreamSection] or [_AllDmsSection] .
227
228
///
@@ -236,6 +237,7 @@ abstract class _HeaderItem extends StatelessWidget {
236
237
required this .count,
237
238
required this .hasMention,
238
239
required this .sectionContext,
240
+ this .isArchived = false ,
239
241
});
240
242
241
243
String title (ZulipLocalizations zulipLocalizations);
@@ -284,16 +286,32 @@ abstract class _HeaderItem extends StatelessWidget {
284
286
const SizedBox (width: 5 ),
285
287
Expanded (child: Padding (
286
288
padding: const EdgeInsets .symmetric (vertical: 4 ),
287
- child: Text (
288
- style: TextStyle (
289
- fontSize: 17 ,
290
- height: (20 / 17 ),
291
- // TODO(design) check if this is the right variable
292
- color: designVariables.labelMenuButton,
293
- ).merge (weightVariableTextStyle (context, wght: 600 )),
289
+ child: RichText (
294
290
maxLines: 1 ,
295
291
overflow: TextOverflow .ellipsis,
296
- title (zulipLocalizations)))),
292
+ text: TextSpan (
293
+ children: [
294
+ TextSpan (
295
+ text: title (zulipLocalizations),
296
+ style: TextStyle (
297
+ fontSize: 17 ,
298
+ height: 20 / 17 ,
299
+ // TODO(design) check if this is the right variable
300
+ color: designVariables.labelMenuButton,
301
+ ).merge (weightVariableTextStyle (context, wght: 600 ))),
302
+ if (isArchived)
303
+ // TODO(#1285): Avoid concatenating translated strings
304
+ WidgetSpan (
305
+ child: Padding (
306
+ padding: EdgeInsetsDirectional .only (start: 4 ),
307
+ child: Text (
308
+ zulipLocalizations.channelArchivedLabel,
309
+ style: TextStyle (
310
+ fontSize: 17 ,
311
+ height: 20 / 17 ,
312
+ color: MessageListTheme .of (context).streamRecipientHeaderChevronRight,
313
+ fontStyle: FontStyle .italic)))),
314
+ ])))),
297
315
const SizedBox (width: 12 ),
298
316
if (hasMention) const _IconMarker (icon: ZulipIcons .at_sign),
299
317
Padding (padding: const EdgeInsetsDirectional .only (end: 16 ),
@@ -435,6 +453,7 @@ class _StreamHeaderItem extends _HeaderItem {
435
453
required super .count,
436
454
required super .hasMention,
437
455
required super .sectionContext,
456
+ required super .isArchived,
438
457
});
439
458
440
459
@override String title (ZulipLocalizations zulipLocalizations) =>
@@ -481,6 +500,7 @@ class _StreamSection extends StatelessWidget {
481
500
collapsed: collapsed,
482
501
pageState: pageState,
483
502
sectionContext: context,
503
+ isArchived: subscription.isArchived,
484
504
);
485
505
return StickyHeaderItem (
486
506
header: header,
0 commit comments