settings: Fix bug when changing stream specific notification setting.

The class for "tr" element was changed in c22de76af7, so
get_stream_id function was not able to get the correct stream-id
from the target element. This commit fixes get_stream_edit
function to also check for closest ".stream-notifications-row"
ancestor element and thus it returns the correct stream id.
This commit is contained in:
Sahil Batra
2023-01-02 23:23:33 +05:30
committed by Tim Abbott
parent d64b536e11
commit d2be34d5aa

View File

@@ -118,7 +118,7 @@ function set_stream_message_retention_setting_dropdown(stream) {
function get_stream_id(target) {
const $row = $(target).closest(
".stream-row, .stream_settings_header, .subscription_settings, .save-button",
".stream-row, .stream-notifications-row, .stream_settings_header, .subscription_settings, .save-button",
);
return Number.parseInt($row.attr("data-stream-id"), 10);
}