diff --git a/static/js/stream_data.js b/static/js/stream_data.js index 32a5b2c6f3..80af023729 100644 --- a/static/js/stream_data.js +++ b/static/js/stream_data.js @@ -451,7 +451,13 @@ exports.initialize_from_page_params = function () { delete page_params.never_subscribed; }; +exports.get_recent_topics_for_id = function (stream_id) { + return recent_topics.get(stream_id); +}; + exports.get_recent_topics = function (stream_name) { + // TODO: deprecate this and have callers use + // get_recent_topics_for_id var stream_id = exports.get_stream_id(stream_name); if (!stream_id) { return []; diff --git a/static/js/topic_list.js b/static/js/topic_list.js index 368b5fb9b3..3d5ed443ed 100644 --- a/static/js/topic_list.js +++ b/static/js/topic_list.js @@ -58,7 +58,7 @@ exports.build_widget = function (parent_elem, stream, active_topic, max_topics) function build_list(stream, active_topic, max_topics) { - var topics = stream_data.get_recent_topics(stream) || []; + var topics = stream_data.get_recent_topics_for_id(my_stream_id) || []; if (active_topic) { active_topic = active_topic.toLowerCase();