2021-02-28 00:41:32 +01:00
|
|
|
import * as muting_ui from "./muting_ui";
|
|
|
|
|
2021-02-10 17:06:24 +01:00
|
|
|
export let loaded = false;
|
2020-08-01 03:43:15 +02:00
|
|
|
|
2021-02-10 17:06:24 +01:00
|
|
|
export function set_up() {
|
|
|
|
loaded = true;
|
2020-07-15 01:29:15 +02:00
|
|
|
$("body").on("click", ".settings-unmute-topic", function (e) {
|
2019-11-02 00:06:25 +01:00
|
|
|
const $row = $(this).closest("tr");
|
2020-10-07 09:17:30 +02:00
|
|
|
const stream_id = Number.parseInt($row.attr("data-stream-id"), 10);
|
2019-11-02 00:06:25 +01:00
|
|
|
const topic = $row.attr("data-topic");
|
2017-04-06 16:56:52 +02:00
|
|
|
|
|
|
|
e.stopImmediatePropagation();
|
2018-12-14 17:20:35 +01:00
|
|
|
|
2021-01-03 12:28:09 +01:00
|
|
|
muting_ui.unmute_topic(stream_id, topic);
|
2018-12-14 17:20:35 +01:00
|
|
|
$row.remove();
|
2017-04-06 16:56:52 +02:00
|
|
|
});
|
|
|
|
|
2020-04-22 23:22:26 +02:00
|
|
|
muting_ui.set_up_muted_topics_ui();
|
2021-02-10 17:06:24 +01:00
|
|
|
}
|
2020-07-12 00:13:47 +02:00
|
|
|
|
2021-02-10 17:06:24 +01:00
|
|
|
export function reset() {
|
|
|
|
loaded = false;
|
|
|
|
}
|