File tree 2 files changed +14
-1
lines changed 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -526,13 +526,16 @@ class _TopicItem extends StatelessWidget {
526
526
child: Text (
527
527
style: TextStyle (
528
528
fontSize: 17 ,
529
+ // ignore: unnecessary_null_comparison // null topic names soon to be enabled
530
+ fontStyle: (topic.displayName == null ) ? FontStyle .italic : null ,
529
531
height: (20 / 17 ),
530
532
// TODO(design) check if this is the right variable
531
533
color: designVariables.labelMenuButton,
532
534
),
533
535
maxLines: 2 ,
534
536
overflow: TextOverflow .ellipsis,
535
- topic.displayName))),
537
+ // ignore: dead_null_aware_expression // null topic names soon to be enabled
538
+ topic.displayName ?? store.realmEmptyTopicDisplayName))),
536
539
const SizedBox (width: 12 ),
537
540
if (hasMention) const _IconMarker (icon: ZulipIcons .at_sign),
538
541
// TODO(design) copies the "@" marker color; is there a better color?
Original file line number Diff line number Diff line change @@ -307,6 +307,16 @@ void main() {
307
307
});
308
308
});
309
309
310
+ testWidgets ('empty topic' , (tester) async {
311
+ final channel = eg.stream ();
312
+ await setupPage (tester,
313
+ streams: [channel],
314
+ subscriptions: [(eg.subscription (channel))],
315
+ unreadMessages: [eg.streamMessage (stream: channel, topic: '' )]);
316
+
317
+ check (find.text (eg.defaultRealmEmptyTopicDisplayName)).findsOne ();
318
+ }, skip: true ); // null topic names soon to be enabled
319
+
310
320
group ('topic visibility' , () {
311
321
final channel = eg.stream ();
312
322
const topic = 'topic' ;
You can’t perform that action at this time.
0 commit comments