mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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:
		@@ -66,7 +66,7 @@ export function get_display_text_for_realm_message_retention_setting() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function get_stream_id(target) {
 | 
					function get_stream_id(target) {
 | 
				
			||||||
    const $row = $(target).closest(
 | 
					    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);
 | 
					    return Number.parseInt($row.attr("data-stream-id"), 10);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user