@@ -200,7 +200,6 @@ class ComposeTopicController extends ComposeController<TopicValidationError> {
200
200
}
201
201
202
202
void setTopic (TopicName newTopic) {
203
- // ignore: dead_null_aware_expression // null topic names soon to be enabled
204
203
value = TextEditingValue (text: newTopic.displayName ?? '' );
205
204
}
206
205
}
@@ -635,7 +634,7 @@ class _StreamContentInputState extends State<_StreamContentInput> {
635
634
}
636
635
637
636
/// The topic name to show in the hint text, or null to show no topic.
638
- String ? _hintTopicStr () {
637
+ TopicName ? _hintTopic () {
639
638
if (widget.controller.topic.isTopicVacuous) {
640
639
if (widget.controller.topic.mandatory) {
641
640
// The chosen topic can't be sent to, so don't show it.
@@ -650,7 +649,7 @@ class _StreamContentInputState extends State<_StreamContentInput> {
650
649
}
651
650
}
652
651
653
- return widget.controller.topic.textNormalized;
652
+ return TopicName ( widget.controller.topic.textNormalized) ;
654
653
}
655
654
656
655
@override
@@ -660,15 +659,14 @@ class _StreamContentInputState extends State<_StreamContentInput> {
660
659
661
660
final streamName = store.streams[widget.narrow.streamId]? .name
662
661
?? zulipLocalizations.unknownChannelName;
663
- final hintTopicStr = _hintTopicStr ();
664
- final hintDestination = hintTopicStr == null
662
+ final hintTopic = _hintTopic ();
663
+ final hintDestination = hintTopic == null
665
664
// No i18n of this use of "#" and ">" string; those are part of how
666
665
// Zulip expresses channels and topics, not any normal English punctuation,
667
666
// so don't make sense to translate. See:
668
667
// https://github.com/zulip/zulip-flutter/pull/1148#discussion_r1941990585
669
668
? '#$streamName '
670
- : '#$streamName > '
671
- '${hintTopicStr .isEmpty ? store .realmEmptyTopicDisplayName : hintTopicStr }' ;
669
+ : '#$streamName > ${hintTopic .displayName ?? store .realmEmptyTopicDisplayName }' ;
672
670
673
671
return _TypingNotifier (
674
672
destination: TopicNarrow (widget.narrow.streamId,
@@ -831,7 +829,6 @@ class _FixedDestinationContentInput extends StatelessWidget {
831
829
// Zulip expresses channels and topics, not any normal English punctuation,
832
830
// so don't make sense to translate. See:
833
831
// https://github.com/zulip/zulip-flutter/pull/1148#discussion_r1941990585
834
- // ignore: dead_null_aware_expression // null topic names soon to be enabled
835
832
'#$streamName > ${topic .displayName ?? store .realmEmptyTopicDisplayName }' );
836
833
837
834
case DmNarrow (otherRecipientIds: []): // The self-1:1 thread.
0 commit comments