Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
minor: Inline filter_table in subs.js.
Steve Howellfed1eaf7d782
diff --git a/frontend_tests/node_tests/subs.js b/frontend_tests/node_tests/subs.jsindex df9eba31b16..83d4f65d4e7 100644--- a/frontend_tests/node_tests/subs.js+++ b/frontend_tests/node_tests/subs.js@@ -27,7 +27,7 @@ set_global("hash_util", {by_stream_uri: () => {},});-run_test("filter_table", (override) => {+run_test("redraw_left_panel", (override) => {override(subs, "add_tooltip_to_left_panel_row", () => {});// set-up sub rows stubs@@ -124,7 +124,7 @@ run_test("filter_table", (override) => {assert(!denmark_row.hasClass("active"));function test_filter(params, expected_streams) {- const stream_ids = subs.filter_table(params);+ const stream_ids = subs.redraw_left_panel(params);assert.deepEqual(stream_ids,expected_streams.map((sub) => sub.stream_id),diff --git a/static/js/subs.js b/static/js/subs.jsindex c3066d0d599..3f4190ba9e6 100644--- a/static/js/subs.js+++ b/static/js/subs.js@@ -429,7 +429,13 @@ exports.render_left_panel_superset = function () {};// LeftPanelParams { input: String, subscribed_only: Boolean, sort_order: String }-exports.filter_table = function (left_panel_params) {+exports.redraw_left_panel = function (left_panel_params) {+ // We only get left_panel_params passed in from tests. Real+ // code calls get_left_panel_params().+ if (left_panel_params === undefined) {+ left_panel_params = exports.get_left_panel_params();+ }+exports.show_active_stream_in_left_panel();function stream_id_for_row(row) {@@ -508,11 +514,6 @@ exports.maybe_reset_right_panel = function () {}};-exports.redraw_left_panel = function () {- const left_panel_params = exports.get_left_panel_params();- exports.filter_table(left_panel_params);-};-// Make it explicit that our toggler is not created right away.exports.toggler = undefined;