Files
zulip/static/js/settings_muting.js
Abhijeet Prasad Bodas fd2bf0b31b refactor: Rename frontend muting stuff to include 'topic'.
This is a prep commit, which renames some variables
and functions involved in topic muting to include
the word "topic" in them.

This is done to have clarity when similar code
will be added as a part of the mute-user in
future commits.
2021-02-05 11:17:46 -08:00

26 lines
594 B
JavaScript

"use strict";
exports.loaded = false;
exports.set_up = function () {
exports.loaded = true;
$("body").on("click", ".settings-unmute-topic", function (e) {
const $row = $(this).closest("tr");
const stream_id = Number.parseInt($row.attr("data-stream-id"), 10);
const topic = $row.attr("data-topic");
e.stopImmediatePropagation();
muting_ui.unmute_topic(stream_id, topic);
$row.remove();
});
muting_ui.set_up_muted_topics_ui();
};
exports.reset = function () {
exports.loaded = false;
};
window.settings_muting = exports;