File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -658,7 +658,8 @@ class _FixedDestinationContentInput extends StatelessWidget {
658
658
// Zulip expresses channels and topics, not any normal English punctuation,
659
659
// so don't make sense to translate. See:
660
660
// https://github.com/zulip/zulip-flutter/pull/1148#discussion_r1941990585
661
- '#$streamName > ${topic .displayName }' );
661
+ // ignore: dead_null_aware_expression // null topic names soon to be enabled
662
+ '#$streamName > ${topic .displayName ?? store .realmEmptyTopicDisplayName }' );
662
663
663
664
case DmNarrow (otherRecipientIds: []): // The self-1:1 thread.
664
665
return zulipLocalizations.composeBoxSelfDmContentHint;
Original file line number Diff line number Diff line change @@ -371,11 +371,22 @@ void main() {
371
371
});
372
372
});
373
373
374
- testWidgets ('to TopicNarrow' , (tester) async {
375
- await prepare (tester,
376
- narrow: TopicNarrow (channel.streamId, TopicName ('topic' )));
377
- checkComposeBoxHintTexts (tester,
378
- contentHintText: 'Message #${channel .name } > topic' );
374
+ group ('to TopicNarrow' , () {
375
+ testWidgets ('to TopicNarrow with non-empty topic' , (tester) async {
376
+ await prepare (tester,
377
+ narrow: TopicNarrow (channel.streamId, TopicName ('topic' )),
378
+ mandatoryTopics: false );
379
+ checkComposeBoxHintTexts (tester,
380
+ contentHintText: 'Message #${channel .name } > topic' );
381
+ });
382
+
383
+ testWidgets ('to TopicNarrow with empty topic' , (tester) async {
384
+ await prepare (tester,
385
+ narrow: TopicNarrow (channel.streamId, TopicName ('' )),
386
+ mandatoryTopics: false );
387
+ checkComposeBoxHintTexts (tester, contentHintText:
388
+ 'Message #${channel .name } > ${eg .defaultRealmEmptyTopicDisplayName }' );
389
+ }, skip: true ); // null topic names soon to be enabled
379
390
});
380
391
381
392
testWidgets ('to DmNarrow with self' , (tester) async {
You can’t perform that action at this time.
0 commit comments