From d94d2d71c5bc4e6fad6caff461170bdf1a320589 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 30 Sep 2013 13:14:56 -0400 Subject: [PATCH] Always show narrowed topic in the topic sidebar. Before this change, you could narrow to an old topic, and it would not show up in the sidebar unless it had unread messages. (imported from commit f177a7378dac064e46a6417357cc86ada4475936) --- static/js/stream_list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/stream_list.js b/static/js/stream_list.js index 02b303b688..0fd8c55181 100644 --- a/static/js/stream_list.js +++ b/static/js/stream_list.js @@ -187,6 +187,10 @@ function rebuild_recent_subjects(stream, active_topic) { var stream_li = get_filter_li('stream', stream); var subjects = recent_subjects.get(stream) || []; + if (active_topic) { + active_topic = active_topic.toLowerCase(); + } + var display_subjects = []; _.each(subjects, function (subject_obj, idx) { @@ -194,7 +198,7 @@ function rebuild_recent_subjects(stream, active_topic) { var num_unread = unread.num_unread_for_subject(stream, subject_obj.canon_subject); // Show the most recent subjects, as well as any with unread messages - if (idx < max_subjects || num_unread > 0) { + if ((idx < max_subjects) || (num_unread > 0) || (active_topic === topic_name)) { var display_subject = { topic_name: topic_name, unread: num_unread,