message_header: Remove the widget to change the visibility policy.

This commit removes the widget to change the visibility policy
for topics in unsubscribed streams.

Earlier, users were able to change the visibility policy in an
unsubscribed stream, which can lead to confusion.

For example, a person might think that they would get notifications
about new messages in the topic of the unsubscribed stream,
which of course they wouldn't.
This commit is contained in:
Prakhar Pratyush 2023-09-25 10:07:24 +05:30 committed by Tim Abbott
parent e1d867c05e
commit 8df42a729d
2 changed files with 25 additions and 23 deletions

View File

@ -209,6 +209,7 @@ function populate_group_from_message_container(group, message_container) {
group.stream_id = sub.stream_id;
group.stream_muted = sub.is_muted;
}
group.is_subscribed = stream_data.is_subscribed(group.stream_id);
group.topic_is_resolved = resolved_topic.is_resolved(group.topic);
group.topic_muted = user_topics.is_topic_muted(group.stream_id, group.topic);
group.topic_unmuted = user_topics.is_topic_unmuted(group.stream_id, group.topic);

View File

@ -58,6 +58,7 @@
<div class="toggle_resolve_topic_spinner" style="display: none"></div>
{{/if}}
{{#if is_subscribed}}
{{#if development}}
<span class="change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">
{{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}
@ -83,7 +84,7 @@
{{#if topic_muted}} data-tooltip-template-id="topic-unmute-tooltip-template" aria-label="{{t 'Unmute topic' }}" {{else}} data-tooltip-template-id="topic-mute-tooltip-template" aria-label="{{t 'Mute topic' }}" {{/if}}></i>
{{/if}}
{{/if}}
{{/if}}
</span>
<span class="recipient_row_date {{#if date_unchanged}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
</div>