mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
Revert "list_render: Clean up initialization."
I pushed this risk commit to the end of a PR that had a bunch of harmless prep commits at the front, and I didn't make it clear enough that the last commit (this one) hadn't been tested thoroughly. For the list_render widget, we can simplify the intialization pretty easily (avoid extra sorts, for example), but the cache aspects are still tricky on subsequent calls.
This commit is contained in:
@@ -23,7 +23,7 @@ exports.build_default_stream_table = function () {
|
||||
const stream_ids = stream_data.get_default_stream_ids();
|
||||
const subs = stream_ids.map(stream_data.get_sub_by_id);
|
||||
|
||||
list_render.create(table, subs, {
|
||||
const streams_list = list_render.create(table, subs, {
|
||||
name: "default_streams_list",
|
||||
modifier: function (item) {
|
||||
const row = $(render_admin_default_streams_list({
|
||||
@@ -42,8 +42,9 @@ exports.build_default_stream_table = function () {
|
||||
},
|
||||
},
|
||||
parent_container: $("#admin-default-streams-list").expectOne(),
|
||||
init_sort: ['alphabetic', 'name'],
|
||||
});
|
||||
}).init();
|
||||
|
||||
streams_list.sort("alphabetic", "name");
|
||||
|
||||
loading.destroy_indicator($('#admin_page_default_streams_loading_indicator'));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user