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.

settings: Fix reuse of .stream-row class name.

Tim Abbottc22de76af7a8
diff --git a/static/js/settings_notifications.js b/static/js/settings_notifications.js
index 084386b66c0..e79fec1db16 100644
--- a/static/js/settings_notifications.js
+++ b/static/js/settings_notifications.js
@@ -29,7 +29,7 @@ function rerender_ui() {
const unmatched_streams =
stream_settings_data.get_unmatched_streams_for_notification_settings();
- $unmatched_streams_table.find(".stream-row").remove();
+ $unmatched_streams_table.find(".stream-notifications-row").remove();
const muted_stream_ids = stream_data.muted_stream_ids();
@@ -249,7 +249,9 @@ export function update_page(settings_panel) {
export function update_muted_stream_state(sub) {
const $row = $(
- `#stream-specific-notify-table .stream-row[data-stream-id='${CSS.escape(sub.stream_id)}']`,
+ `#stream-specific-notify-table .stream-notifications-row[data-stream-id='${CSS.escape(
+ sub.stream_id,
+ )}']`,
);
$row.toggleClass("control-label-disabled", sub.is_muted);
@@ -275,7 +277,7 @@ export function initialize() {
$("body").on("click", "#stream-specific-notify-table .unmute_stream", (e) => {
e.preventDefault();
e.stopPropagation();
- const $row = $(e.currentTarget).closest(".stream-row");
+ const $row = $(e.currentTarget).closest(".stream-notifications-row");
const stream_id = Number.parseInt($row.attr("data-stream-id"), 10);
const sub = sub_store.get(stream_id);
diff --git a/static/templates/settings/stream_specific_notification_row.hbs b/static/templates/settings/stream_specific_notification_row.hbs
index b05bf5b0a0d..1d14551dd3f 100644
--- a/static/templates/settings/stream_specific_notification_row.hbs
+++ b/static/templates/settings/stream_specific_notification_row.hbs
@@ -1,4 +1,4 @@
-<tr class="stream-row {{#if muted}}control-label-disabled{{/if}}" data-stream-id="{{stream.stream_id}}">
+<tr class="stream-notifications-row {{#if muted}}control-label-disabled{{/if}}" data-stream-id="{{stream.stream_id}}">
<td>
<span id="stream_privacy_swatch_{{stream.stream_id}}" class="stream-privacy filter-icon">
{{> ../stream_privacy