Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_feed_ui: Remove "Unmute topic" from message action menu.

sayamsamal9488022d869f
diff --git a/static/js/popovers.js b/static/js/popovers.js
index 35773919dc8..05e55eb7c02 100644
--- a/static/js/popovers.js
+++ b/static/js/popovers.js
@@ -30,8 +30,6 @@ import * as message_edit from "./message_edit";
import * as message_edit_history from "./message_edit_history";
import * as message_lists from "./message_lists";
import * as message_viewport from "./message_viewport";
-import * as muted_topics from "./muted_topics";
-import * as muted_topics_ui from "./muted_topics_ui";
import * as muted_users from "./muted_users";
import * as muted_users_ui from "./muted_users_ui";
import * as narrow from "./narrow";
@@ -469,10 +467,6 @@ export function toggle_actions_popover(element, id) {
use_edit_icon = false;
editability_menu_item = $t({defaultMessage: "View source"});
}
- const topic = message.topic;
-
- const can_unmute_topic =
- message.stream && topic && muted_topics.is_topic_muted(message.stream_id, topic);
const should_display_edit_history_option =
message.edit_history &&
@@ -511,10 +505,8 @@ export function toggle_actions_popover(element, id) {
message_id: message.id,
historical: message.historical,
stream_id: message.stream_id,
- topic,
use_edit_icon,
editability_menu_item,
- can_unmute_topic,
should_display_collapse,
should_display_uncollapse,
should_display_add_reaction_option: message.sent_by_me,
@@ -1233,16 +1225,6 @@ export function register_click_handlers() {
e.preventDefault();
});
- $("body").on("click", ".popover_unmute_topic", (e) => {
- const stream_id = Number.parseInt($(e.currentTarget).attr("data-msg-stream-id"), 10);
- const topic = $(e.currentTarget).attr("data-msg-topic");
-
- hide_actions_popover();
- muted_topics_ui.unmute_topic(stream_id, topic);
- e.stopPropagation();
- e.preventDefault();
- });
-
$("body").on("click", ".delete_message", (e) => {
const message_id = $(e.currentTarget).data("message-id");
hide_actions_popover();
diff --git a/static/templates/actions_popover_content.hbs b/static/templates/actions_popover_content.hbs
index 73dcc77595d..189640ad33c 100644
--- a/static/templates/actions_popover_content.hbs
+++ b/static/templates/actions_popover_content.hbs
@@ -70,15 +70,6 @@
</li>
{{/if}}
- {{#if can_unmute_topic}}
- <li>
- <a class="popover_unmute_topic" data-msg-stream-id="{{stream_id}}" data-msg-topic="{{topic}}" tabindex="0">
- <i class="fa fa-bell" aria-hidden="true"></i>
- {{#tr}}Unmute the topic <b>{topic}</b>{{/tr}}
- </a>
- </li>
- {{/if}}
-
{{#if should_display_add_reaction_option}}
<li>
<a class="reaction_button" data-message-id="{{message_id}}" tabindex="0">