mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	muted_topics: Rerender list only if modal is opened and section is loaded.
We should rernder the muted topics list in settings only if the settings modal is opened and the muted topics section is loaded.
This commit is contained in:
		@@ -20,7 +20,9 @@ exports.rerender = function () {
 | 
			
		||||
    if (current_msg_list !== home_msg_list) {
 | 
			
		||||
        home_msg_list.update_muting_and_rerender();
 | 
			
		||||
    }
 | 
			
		||||
    exports.set_up_muted_topics_ui();
 | 
			
		||||
    if (overlays.settings_open() && settings_muting.loaded) {
 | 
			
		||||
        exports.set_up_muted_topics_ui();
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.persist_mute = function (stream_id, topic_name) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,7 @@
 | 
			
		||||
exports.loaded = false;
 | 
			
		||||
 | 
			
		||||
exports.set_up = function () {
 | 
			
		||||
    exports.loaded = true;
 | 
			
		||||
    $('body').on('click', '.settings-unmute-topic', function (e) {
 | 
			
		||||
        const $row = $(this).closest("tr");
 | 
			
		||||
        const stream_id = parseInt($row.attr("data-stream-id"), 10);
 | 
			
		||||
@@ -13,4 +16,8 @@ exports.set_up = function () {
 | 
			
		||||
    muting_ui.set_up_muted_topics_ui();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.reset = function () {
 | 
			
		||||
    exports.loaded = false;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
window.settings_muting = exports;
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,7 @@ exports.reset_sections = function () {
 | 
			
		||||
    settings_profile_fields.reset();
 | 
			
		||||
    settings_streams.reset();
 | 
			
		||||
    settings_user_groups.reset();
 | 
			
		||||
    settings_muting.reset();
 | 
			
		||||
    // settings_users doesn't need a reset()
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user