mirror of https://github.com/zulip/zulip.git
minor: Add comment explaining list_render.get call.
It's a bit confusing when you read this code to know where the original list was created. I'm not a huge fan of the cache scheme here, but it does seem to work for live updates.
This commit is contained in:
parent
ea6934c26d
commit
90ed18d01a
|
@ -163,6 +163,14 @@ exports.update_subscribers_list = function (sub) {
|
|||
$(".subscriber_list_settings_container").hide();
|
||||
} else {
|
||||
const emails = stream_edit.get_email_of_subscribers(sub.subscribers);
|
||||
|
||||
/*
|
||||
We try to find a subscribers list that is already in the
|
||||
cache that list_render.js maintains. The list we are
|
||||
looking for would have been created in the function
|
||||
stream_edit.show_subscription_settings, using the same
|
||||
naming scheme as below for the `name` parameter.
|
||||
*/
|
||||
const subscribers_list = list_render.get("stream_subscribers/" + sub.stream_id);
|
||||
|
||||
// Changing the data clears the rendered list and the list needs to be re-rendered.
|
||||
|
|
Loading…
Reference in New Issue