Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_header: Remove the widget to change the visibility policy.
Prakhar Pratyush8df42a729deb
diff --git a/web/src/message_list_view.js b/web/src/message_list_view.jsindex 429dc67fd92..c62889e8e0f 100644--- a/web/src/message_list_view.js+++ b/web/src/message_list_view.js@@ -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);diff --git a/web/templates/recipient_row.hbs b/web/templates/recipient_row.hbsindex 2d79c116049..c2443defef6 100644--- a/web/templates/recipient_row.hbs+++ b/web/templates/recipient_row.hbs@@ -58,32 +58,33 @@<div class="toggle_resolve_topic_spinner" style="display: none"></div>{{/if}}- {{#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)}}- <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}- <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.MUTED)}}- <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>+ {{#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)}}+ <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}+ <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.MUTED)}}+ <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>+ {{else}}+ <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>+ {{/if}}+ </span>+ {{else}}+ {{#if stream_muted}}+ <i class="zulip-icon zulip-icon-unmute stream_muted {{#if topic_unmuted}} on_hover_topic_mute {{else}} on_hover_topic_unmute {{/if}} recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"+ {{#if topic_unmuted}} data-tooltip-template-id="topic-mute-tooltip-template" aria-label="{{t 'Mute topic' }}" {{else}} data-tooltip-template-id="topic-unmute-tooltip-template" aria-label="{{t 'Unmute topic' }}" {{/if}}></i>{{else}}- <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>+ <i class="zulip-icon zulip-icon-mute stream_unmuted{{#if topic_muted}} on_hover_topic_unmute {{else}} on_hover_topic_mute {{/if}} recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"+ {{#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}}- </span>- {{else}}- {{#if stream_muted}}- <i class="zulip-icon zulip-icon-unmute stream_muted {{#if topic_unmuted}} on_hover_topic_mute {{else}} on_hover_topic_unmute {{/if}} recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"- {{#if topic_unmuted}} data-tooltip-template-id="topic-mute-tooltip-template" aria-label="{{t 'Mute topic' }}" {{else}} data-tooltip-template-id="topic-unmute-tooltip-template" aria-label="{{t 'Unmute topic' }}" {{/if}}></i>- {{else}}- <i class="zulip-icon zulip-icon-mute stream_unmuted{{#if topic_muted}} on_hover_topic_unmute {{else}} on_hover_topic_mute {{/if}} recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"- {{#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}}-</span><span class="recipient_row_date {{#if date_unchanged}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span></div>