mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 19:13:53 +00:00
navbar: Live update icon for stream privacy changes.
Prior to this commit the icon in the navbar didn't live update to reflect changes in stream privacy. Here, we add a call to `tab_bar.render_title_area` in `subs.update_stream_privacy()`, to enable live updates on the icon. Fixes #14728.
This commit is contained in:
@@ -184,10 +184,13 @@ exports.update_stream_privacy = function (sub, values) {
|
||||
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
|
||||
// Update navbar stream name if needed
|
||||
const filter = narrow_state.filter();
|
||||
if (filter && filter.operands("stream")[0] === sub.name) {
|
||||
// update the stream_params stored in the filter object
|
||||
filter.fix_stream_params();
|
||||
// use these to update the navbar
|
||||
tab_bar.render_title_area();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -151,9 +151,8 @@ exports.initialize = function () {
|
||||
};
|
||||
|
||||
exports.render_title_area = function () {
|
||||
// TODO: Implement rerendering for stream privacy or subscriber
|
||||
// count changes. We simply need to call this function in the
|
||||
// appropriate places.
|
||||
// TODO: Implement rerendering for subscriber count changes.
|
||||
// We simply need to call this function in the appropriate places.
|
||||
const filter = narrow_state.filter();
|
||||
build_tab_bar(filter);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user