mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 21:48:30 +00:00
Extract topic_data.js.
This new module tracks the recent topic names for any given stream. The code was pulled over almost verbatim from stream_data.js, with minor renames to the function names. We introduced a minor one-line function called stream_has_topics.
This commit is contained in:
@@ -164,7 +164,7 @@ exports.get_next_topic = function (curr_stream, curr_topic) {
|
||||
|
||||
function get_unmuted_topics(stream_name) {
|
||||
var stream_id = stream_data.get_stream_id(stream_name);
|
||||
var topics = stream_data.get_recent_topic_names(stream_id);
|
||||
var topics = topic_data.get_recent_names(stream_id);
|
||||
topics = _.reject(topics, function (topic) {
|
||||
return muting.is_topic_muted(stream_name, topic);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user