mirror of https://github.com/zulip/zulip.git
inbox_ui: Fix mute / unmute not working.
This is fix for the old version of mute / unmute buttons. Code borrowed from click_handlers.
This commit is contained in:
parent
0fd4e309d5
commit
3a2fbfc2fd
|
@ -1309,4 +1309,40 @@ export function initialize() {
|
||||||
current_focus_id = INBOX_SEARCH_ID;
|
current_focus_id = INBOX_SEARCH_ID;
|
||||||
compose_closed_ui.set_standard_text_for_reply_button();
|
compose_closed_ui.set_standard_text_for_reply_button();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Mute topic in a unmuted stream
|
||||||
|
$("body").on("click", "#inbox-list .stream_unmuted.on_hover_topic_mute", (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
user_topics.set_visibility_policy_for_element(
|
||||||
|
$(e.target),
|
||||||
|
user_topics.all_visibility_policies.MUTED,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Unmute topic in a unmuted stream
|
||||||
|
$("body").on("click", "#inbox-list .stream_unmuted.on_hover_topic_unmute", (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
user_topics.set_visibility_policy_for_element(
|
||||||
|
$(e.target),
|
||||||
|
user_topics.all_visibility_policies.INHERIT,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Unmute topic in a muted stream
|
||||||
|
$("body").on("click", "#inbox-list .stream_muted.on_hover_topic_unmute", (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
user_topics.set_visibility_policy_for_element(
|
||||||
|
$(e.target),
|
||||||
|
user_topics.all_visibility_policies.UNMUTED,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mute topic in a muted stream
|
||||||
|
$("body").on("click", "#inbox-list .stream_muted.on_hover_topic_mute", (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
user_topics.set_visibility_policy_for_element(
|
||||||
|
$(e.target),
|
||||||
|
user_topics.all_visibility_policies.INHERIT,
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue