File tree 2 files changed +18
-1
lines changed
2 files changed +18
-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,20 @@ void main() {
307
307
});
308
308
});
309
309
310
+ group ('general chat' , () {
311
+ final channel = eg.stream ();
312
+ final subscription = eg.subscription (channel);
313
+
314
+ testWidgets ('show general chat' , (tester) async {
315
+ await setupPage (tester,
316
+ streams: [channel],
317
+ subscriptions: [subscription],
318
+ unreadMessages: [eg.streamMessage (stream: channel, topic: '' )]);
319
+
320
+ check (find.text (eg.defaultRealmEmptyTopicDisplayName)).findsOne ();
321
+ }, skip: true ); // null topic names soon to be enabled
322
+ });
323
+
310
324
group ('topic visibility' , () {
311
325
final channel = eg.stream ();
312
326
const topic = 'topic' ;
You can’t perform that action at this time.
0 commit comments