mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
recipient_row: Use unmute icon for topics in muted stream.
Updated mute_or_unmute_topic to take visibility policy as parameter and set topic visibility_policy to the passed visibility_policy. In zulip.css, updated CSS to set opacity as per visibility_policy. Updated click handlers for recipient_row mute/unmute icons to work as per stream. Fixes #25124
This commit is contained in:
committed by
Tim Abbott
parent
06709bc5da
commit
eee5c99cd7
@@ -43,6 +43,7 @@ import * as topic_list from "./topic_list";
|
||||
import * as ui_util from "./ui_util";
|
||||
import {parse_html} from "./ui_util";
|
||||
import * as user_profile from "./user_profile";
|
||||
import * as user_topics from "./user_topics";
|
||||
import * as util from "./util";
|
||||
|
||||
export function initialize() {
|
||||
@@ -384,15 +385,40 @@ export function initialize() {
|
||||
message_edit.toggle_resolve_topic(message_id, topic_name);
|
||||
});
|
||||
|
||||
// TOPIC MUTING
|
||||
$("body").on("click", ".message_header .on_hover_topic_mute", (e) => {
|
||||
// Mute topic in a unmuted stream
|
||||
$("body").on("click", ".message_header .stream_unmuted.on_hover_topic_mute", (e) => {
|
||||
e.stopPropagation();
|
||||
muted_topics_ui.mute_or_unmute_topic($(e.target), true);
|
||||
muted_topics_ui.mute_or_unmute_topic(
|
||||
$(e.target),
|
||||
user_topics.all_visibility_policies.MUTED,
|
||||
);
|
||||
});
|
||||
|
||||
$("body").on("click", ".message_header .on_hover_topic_unmute", (e) => {
|
||||
// Unmute topic in a unmuted stream
|
||||
$("body").on("click", ".message_header .stream_unmuted.on_hover_topic_unmute", (e) => {
|
||||
e.stopPropagation();
|
||||
muted_topics_ui.mute_or_unmute_topic($(e.target), false);
|
||||
muted_topics_ui.mute_or_unmute_topic(
|
||||
$(e.target),
|
||||
user_topics.all_visibility_policies.INHERIT,
|
||||
);
|
||||
});
|
||||
|
||||
// Unmute topic in a muted stream
|
||||
$("body").on("click", ".message_header .stream_muted.on_hover_topic_unmute", (e) => {
|
||||
e.stopPropagation();
|
||||
muted_topics_ui.mute_or_unmute_topic(
|
||||
$(e.target),
|
||||
user_topics.all_visibility_policies.UNMUTED,
|
||||
);
|
||||
});
|
||||
|
||||
// Mute topic in a muted stream
|
||||
$("body").on("click", ".message_header .stream_muted.on_hover_topic_mute", (e) => {
|
||||
e.stopPropagation();
|
||||
muted_topics_ui.mute_or_unmute_topic(
|
||||
$(e.target),
|
||||
user_topics.all_visibility_policies.INHERIT,
|
||||
);
|
||||
});
|
||||
|
||||
// RECIPIENT BARS
|
||||
|
||||
Reference in New Issue
Block a user