mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
js: Use modern spread arguments syntax.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
2475adbf8a
commit
59d55d1e06
@@ -157,15 +157,12 @@ exports.unread_pm_counter = (function () {
|
||||
};
|
||||
|
||||
self.get_msg_ids = function () {
|
||||
const lists = [];
|
||||
const ids = [];
|
||||
|
||||
for (const id_set of bucketer.values()) {
|
||||
const members = Array.from(id_set);
|
||||
lists.push(members);
|
||||
ids.push(...Array.from(id_set));
|
||||
}
|
||||
|
||||
const ids = [].concat.apply([], lists);
|
||||
|
||||
return util.sorted_ids(ids);
|
||||
};
|
||||
|
||||
@@ -333,16 +330,14 @@ exports.unread_topic_counter = (function () {
|
||||
return [];
|
||||
}
|
||||
|
||||
const topic_lists = [];
|
||||
const ids = [];
|
||||
const sub = stream_data.get_sub_by_id(stream_id);
|
||||
for (const [topic, msgs] of per_stream_bucketer) {
|
||||
if (sub && !muting.is_topic_muted(stream_id, topic)) {
|
||||
topic_lists.push(Array.from(msgs));
|
||||
ids.push(...Array.from(msgs));
|
||||
}
|
||||
}
|
||||
|
||||
const ids = [].concat.apply([], topic_lists);
|
||||
|
||||
return util.sorted_ids(ids);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user