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