Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Fix live update of stream name when renamed.
Suyash Vardhan Mathur6b48fb3c08ed
diff --git a/static/js/stream_list.js b/static/js/stream_list.jsindex f68fd83ff6c..30860410592 100644--- a/static/js/stream_list.js+++ b/static/js/stream_list.js@@ -84,7 +84,7 @@ exports.create_initial_sidebar_rows = function () {}};-exports.build_stream_list = function () {+exports.build_stream_list = function (force_rerender) {// This function assumes we have already created the individual// sidebar rows. Our job here is to build the bigger widget,// which largely is a matter of arranging the individual rows in@@ -98,7 +98,7 @@ exports.build_stream_list = function () {// we get three lists of streams (pinned/normal/dormant).const stream_groups = stream_sort.sort_groups(streams, get_search_term());- if (stream_groups.same_as_before) {+ if (stream_groups.same_as_before && !force_rerender) {return;}@@ -307,9 +307,9 @@ function set_stream_unread_count(stream_id, count) {exports.update_count_in_dom(unread_count_elem, count);}-exports.update_streams_sidebar = function () {+exports.update_streams_sidebar = function (force_rerender) {const finish = blueslip.start_timing("build_stream_list");- exports.build_stream_list();+ exports.build_stream_list(force_rerender);finish();exports.stream_cursor.redraw();@@ -332,7 +332,7 @@ exports.update_dom_with_unread_counts = function (counts) {exports.rename_stream = function (sub) {// The sub object is expected to already have the updated namebuild_stream_sidebar_row(sub);- exports.update_streams_sidebar(); // big hammer+ exports.update_streams_sidebar(true); // big hammer};exports.refresh_pinned_or_unpinned_stream = function (sub) {