mirror of https://github.com/zulip/zulip.git
subs: Call `filter.fix_stream_params` when updating stream privacy.
The navbar currently does not live update the stream icon correctly for changes in stream privacy. One place where the correct behaviour gets blocked is on the `_is_stream_private` prop in the filter object. We keep props such as this for convenience, to reduce calls to `subs`, however, this prop becomes inconsistent with the value we get from `subs` when the stream privacy is updated. In this commit we add a call to `filter.fix_stream_params` in `subs.update_stream_privacy`. This change does not fix the live rerendering in the navbar because we don't call redraw yet, but it's a prep commit to towards that goal
This commit is contained in:
parent
35c8dcb599
commit
d496304caa
|
@ -183,6 +183,12 @@ exports.update_stream_privacy = function (sub, values) {
|
|||
stream_ui_updates.update_subscribers_count(sub);
|
||||
stream_ui_updates.update_add_subscriptions_elements(sub);
|
||||
stream_list.redraw_stream_privacy(sub);
|
||||
|
||||
// update the stream_params stored in the filter object if needed
|
||||
const filter = narrow_state.filter();
|
||||
if (filter && filter.operands("stream")[0] === sub.name) {
|
||||
filter.fix_stream_params();
|
||||
}
|
||||
};
|
||||
|
||||
exports.update_stream_post_policy = function (sub, new_value) {
|
||||
|
|
Loading…
Reference in New Issue