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