From 01e948ac97a2fefdd100b0355feb8a4d28e3ab2a Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Thu, 30 Jan 2014 15:00:13 -0500 Subject: [PATCH] Allow unnarrowing to an empty message list in unread-messages-read case (imported from commit f377dbce61fe2fc2051bc286f7215e8112f92736) --- static/js/narrow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/narrow.js b/static/js/narrow.js index 5d8f406c9d..d7eaa51b97 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -424,9 +424,9 @@ exports.deactivate = function () { var first_unread = _.find(current_msg_list.all(), unread.message_unread); if (first_unread) { current_msg_list.select_id(first_unread.id, {use_closest: true, - then_scroll: true}); + then_scroll: true, empty_ok: true}); } else { - current_msg_list.select_id(current_msg_list.last().id, {then_scroll: true}); + current_msg_list.select_id(current_msg_list.last().id, {then_scroll: true, empty_ok: true}); } } else { // We narrowed, but only backwards in time (ie no unread were read). Try