mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	subs: Don't try to update stream settings UI when closed.
The recent fixes we made to make stream settings update properly when doing live updates were great, but they would throw an exception if the stream settings overlay wasn't open. This fixes that by adding the appropriate check.
This commit is contained in:
		@@ -106,8 +106,8 @@ exports.mark_subscribed = function (sub, subscribers, color) {
 | 
				
			|||||||
        stream_data.set_subscribers(sub, subscribers);
 | 
					        stream_data.set_subscribers(sub, subscribers);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    subs.update_settings_for_subscribed(sub);
 | 
					 | 
				
			||||||
    if (overlays.streams_open()) {
 | 
					    if (overlays.streams_open()) {
 | 
				
			||||||
 | 
					        subs.update_settings_for_subscribed(sub);
 | 
				
			||||||
        subs.actually_filter_streams();
 | 
					        subs.actually_filter_streams();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -129,8 +129,9 @@ exports.mark_unsubscribed = function (sub) {
 | 
				
			|||||||
    } else if (sub.subscribed) {
 | 
					    } else if (sub.subscribed) {
 | 
				
			||||||
        stream_data.unsubscribe_myself(sub);
 | 
					        stream_data.unsubscribe_myself(sub);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (overlays.streams_open()) {
 | 
				
			||||||
            subs.update_settings_for_unsubscribed(sub);
 | 
					            subs.update_settings_for_unsubscribed(sub);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        // Already unsubscribed
 | 
					        // Already unsubscribed
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user