File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -531,13 +531,16 @@ class _TopicItem extends StatelessWidget {
531
531
child: Text (
532
532
style: TextStyle (
533
533
fontSize: 17 ,
534
+ // ignore: unnecessary_null_comparison // null topic names soon to be enabled
535
+ fontStyle: topic.displayName == null ? FontStyle .italic : null ,
534
536
height: (20 / 17 ),
535
537
// TODO(design) check if this is the right variable
536
538
color: designVariables.labelMenuButton,
537
539
),
538
540
maxLines: 2 ,
539
541
overflow: TextOverflow .ellipsis,
540
- topic.displayName))),
542
+ // ignore: dead_null_aware_expression // null topic names soon to be enabled
543
+ topic.displayName ?? store.realmEmptyTopicDisplayName))),
541
544
const SizedBox (width: 12 ),
542
545
if (hasMention) const _IconMarker (icon: ZulipIcons .at_sign),
543
546
// 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