File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -579,8 +579,15 @@ class _StreamContentInputState extends State<_StreamContentInput> {
579
579
super .dispose ();
580
580
}
581
581
582
- /// The topic name to use in the hint text.
583
- TopicName _hintTopic () {
582
+ /// The topic name to show in the hint text, or null to show no topic.
583
+ TopicName ? _hintTopic () {
584
+ if (widget.controller.topic.isTopicVacuous) {
585
+ if (widget.controller.topic.mandatory) {
586
+ // The chosen topic can't be sent to, so don't show it.
587
+ return null ;
588
+ }
589
+ }
590
+
584
591
return TopicName (widget.controller.topic.textNormalized);
585
592
}
586
593
@@ -591,12 +598,13 @@ class _StreamContentInputState extends State<_StreamContentInput> {
591
598
592
599
final streamName = store.streams[widget.narrow.streamId]? .name
593
600
?? zulipLocalizations.unknownChannelName;
594
- final hintDestination =
601
+ final hintTopic = _hintTopic ();
602
+ final hintDestination = hintTopic == null ?
595
603
// No i18n of this use of "#" and ">" string; those are part of how
596
604
// Zulip expresses channels and topics, not any normal English punctuation,
597
605
// so don't make sense to translate. See:
598
606
// https://github.com/zulip/zulip-flutter/pull/1148#discussion_r1941990585
599
- '#$streamName > ${_hintTopic () .displayName }' ;
607
+ '#$streamName ' : '#$ streamName > ${hintTopic .displayName }' ;
600
608
601
609
return _ContentInput (
602
610
narrow: widget.narrow,
You can’t perform that action at this time.
0 commit comments