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 @@ -671,7 +671,8 @@ class _FixedDestinationContentInput extends StatelessWidget {
671
671
// Zulip expresses channels and topics, not any normal English punctuation,
672
672
// so don't make sense to translate. See:
673
673
// https://github.com/zulip/zulip-flutter/pull/1148#discussion_r1941990585
674
- '#$streamName > ${topic .displayName }' );
674
+ // ignore: dead_null_aware_expression // null topic names soon to be enabled
675
+ '#$streamName > ${topic .displayName ?? store .realmEmptyTopicDisplayName }' );
675
676
676
677
case DmNarrow (otherRecipientIds: []): // The self-1:1 thread.
677
678
return zulipLocalizations.composeBoxSelfDmContentHint;
Original file line number Diff line number Diff line change @@ -395,11 +395,22 @@ void main() {
395
395
});
396
396
});
397
397
398
- testWidgets ('to TopicNarrow' , (tester) async {
399
- await prepare (tester,
400
- narrow: TopicNarrow (channel.streamId, TopicName ('topic' )));
401
- checkComposeBoxHintTexts (tester,
402
- contentHintText: 'Message #${channel .name } > topic' );
398
+ group ('to TopicNarrow' , () {
399
+ testWidgets ('to TopicNarrow with non-empty topic' , (tester) async {
400
+ await prepare (tester,
401
+ narrow: TopicNarrow (channel.streamId, TopicName ('topic' )),
402
+ mandatoryTopics: false );
403
+ checkComposeBoxHintTexts (tester,
404
+ contentHintText: 'Message #${channel .name } > topic' );
405
+ });
406
+
407
+ testWidgets ('to TopicNarrow with empty topic' , (tester) async {
408
+ await prepare (tester,
409
+ narrow: TopicNarrow (channel.streamId, TopicName ('' )),
410
+ mandatoryTopics: false );
411
+ checkComposeBoxHintTexts (tester, contentHintText:
412
+ 'Message #${channel .name } > ${eg .defaultRealmEmptyTopicDisplayName }' );
413
+ }, skip: true ); // null topic names soon to be enabled
403
414
});
404
415
405
416
testWidgets ('to DmNarrow with self' , (tester) async {
You can’t perform that action at this time.
0 commit comments