From 45a23712ffe81527f61ae2387f015fad3d1f76f3 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 2 Dec 2013 15:16:00 -0500 Subject: [PATCH] Select first unread msg when narrowing from user sidebars. (imported from commit a57508fb2084559c968b23ec4643b7484cbba6cb) --- static/js/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/ui.js b/static/js/ui.js index af17a78efd..621e90d6c7 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -1347,7 +1347,7 @@ $(function () { $('#user_presences').expectOne().on('click', '.selectable_sidebar_block', function (e) { var email = $(e.target).parents('li').attr('data-email'); - narrow.by('pm-with', email, {trigger: 'sidebar'}); + narrow.by('pm-with', email, {select_first_unread: true, trigger: 'sidebar'}); // The preventDefault is necessary so that clicking the // link doesn't jump us to the top of the page. e.preventDefault(); @@ -1365,7 +1365,7 @@ $(function () { $('#group-pms').expectOne().on('click', '.selectable_sidebar_block', function (e) { var emails = $(e.target).parents('li').attr('data-emails'); - narrow.by('pm-with', emails, {trigger: 'sidebar'}); + narrow.by('pm-with', emails, {select_first_unread: true, trigger: 'sidebar'}); e.preventDefault(); e.stopPropagation(); popovers.hide_all();