Select first unread msg when narrowing from user sidebars.

(imported from commit a57508fb2084559c968b23ec4643b7484cbba6cb)
This commit is contained in:
Steve Howell 2013-12-02 15:16:00 -05:00
parent 42e23dc82e
commit 45a23712ff
1 changed files with 2 additions and 2 deletions

View File

@ -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();