mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
refactor: Call peer_data.get_subscriber_count().
We are trying to move away from having the subscriber count on the sub. This commit handles the easy one-liners in the JS code.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
const peer_data = require("./peer_data");
|
||||
|
||||
function display_pill(sub) {
|
||||
return "#" + sub.name + ": " + sub.subscriber_count + " users";
|
||||
const sub_count = peer_data.get_subscriber_count(sub.stream_id);
|
||||
return "#" + sub.name + ": " + sub_count + " users";
|
||||
}
|
||||
|
||||
exports.create_item_from_stream_name = function (stream_name, current_items) {
|
||||
|
||||
Reference in New Issue
Block a user