mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
js: Skip redundant jQuery object reconstruction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
33c790e2fc
commit
b0dba411d9
@@ -252,16 +252,17 @@ export function update_muted_stream_state(sub) {
|
||||
`#stream-specific-notify-table .stream-row[data-stream-id='${CSS.escape(sub.stream_id)}']`,
|
||||
);
|
||||
|
||||
$($row).toggleClass("control-label-disabled", sub.is_muted);
|
||||
$row.toggleClass("control-label-disabled", sub.is_muted);
|
||||
if (sub.is_muted) {
|
||||
$($row).find(".unmute_stream").show();
|
||||
$row.find(".unmute_stream").show();
|
||||
} else {
|
||||
$($row).find(".unmute_stream").hide();
|
||||
$row.find(".unmute_stream").hide();
|
||||
}
|
||||
$($row).find("input").prop("disabled", sub.is_muted);
|
||||
$($row)
|
||||
.find('[name="push_notifications"]')
|
||||
.prop("disabled", !page_params.realm_push_notifications_enabled || sub.is_muted);
|
||||
$row.find("input").prop("disabled", sub.is_muted);
|
||||
$row.find('[name="push_notifications"]').prop(
|
||||
"disabled",
|
||||
!page_params.realm_push_notifications_enabled || sub.is_muted,
|
||||
);
|
||||
}
|
||||
|
||||
export function initialize() {
|
||||
|
||||
Reference in New Issue
Block a user