Allow unnarrowing to an empty message list in unread-messages-read case

(imported from commit f377dbce61fe2fc2051bc286f7215e8112f92736)
This commit is contained in:
Leo Franchi 2014-01-30 15:00:13 -05:00
parent 1056078415
commit 01e948ac97

View File

@ -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