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 @@ -537,13 +537,16 @@ class _TopicItem extends StatelessWidget {
537
537
child: Text (
538
538
style: TextStyle (
539
539
fontSize: 17 ,
540
+ // ignore: unnecessary_null_comparison // null topic names soon to be enabled
541
+ fontStyle: topic.displayName == null ? FontStyle .italic : null ,
540
542
height: (20 / 17 ),
541
543
// TODO(design) check if this is the right variable
542
544
color: designVariables.labelMenuButton,
543
545
),
544
546
maxLines: 2 ,
545
547
overflow: TextOverflow .ellipsis,
546
- topic.displayName))),
548
+ // ignore: dead_null_aware_expression // null topic names soon to be enabled
549
+ topic.displayName ?? store.realmEmptyTopicDisplayName))),
547
550
const SizedBox (width: 12 ),
548
551
if (hasMention) const _IconMarker (icon: ZulipIcons .at_sign),
549
552
// 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