mirror of https://github.com/zulip/zulip.git
Add stream_data.get_recent_topics_for_id().
This commit is contained in:
parent
762194f98d
commit
2e39d48626
|
@ -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 [];
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue