diff --git a/static/js/narrow_state.js b/static/js/narrow_state.js index 53387f2eb0..9a180da2e9 100644 --- a/static/js/narrow_state.js +++ b/static/js/narrow_state.js @@ -203,14 +203,6 @@ exports.get_unread_ids = function () { var topic_name; var pm_string; - if (current_filter.is_exactly('stream')) { - stream_id = exports.stream_id(); - if (stream_id === undefined) { - return []; - } - return unread.get_msg_ids_for_stream(stream_id); - } - if (current_filter.is_exactly('stream', 'topic')) { stream_id = exports.stream_id(); if (stream_id === undefined) { @@ -220,6 +212,14 @@ exports.get_unread_ids = function () { return unread.get_msg_ids_for_topic(stream_id, topic_name); } + if (current_filter.is_exactly('stream')) { + stream_id = exports.stream_id(); + if (stream_id === undefined) { + return []; + } + return unread.get_msg_ids_for_stream(stream_id); + } + if (current_filter.is_exactly('pm-with')) { pm_string = exports.pm_string(); if (pm_string === undefined) {