Fix clicking on streams in left sidebar from subscriptions page.

We previously had 2 mechanisms for narrowing used by the left sidebar
-- the top few links used the hashchange mechanism, while the streams
links used a custom click handler.  Both were buggy -- the hashchange
one hadn't been updated to just select the first unread message,
whereas the click handler didn't change tabs.

Fixes #1141.

(imported from commit 8a8af974e78cc5c33937ac0078f04a9b5452b94a)
This commit is contained in:
Tim Abbott 2013-04-03 14:00:28 -04:00
parent 3a93c8cc90
commit 200fd7ff70
2 changed files with 1 additions and 14 deletions

View File

@ -53,14 +53,8 @@ function parse_narrow(hash) {
var operand = decodeHashComponent(hash[i+1] || '');
operators.push([operator, operand]);
}
var new_selection;
if (current_msg_list.selected_id() !== -1) {
new_selection = current_msg_list.selected_id();
} else {
new_selection = page_params.initial_pointer;
}
narrow.activate(operators, {
then_select_id: new_selection,
select_first_unread: true,
change_hash: false // already set
});
}

View File

@ -985,13 +985,6 @@ $(function () {
compose.start('private', {private_message_recipient: email});
e.preventDefault();
});
$('#stream_filters li').on('click', 'a', function (e) {
var stream = $(e.target).parents('li').data('name');
narrow.by('stream', stream, {select_first_unread: true});
e.preventDefault();
});
});
function sort_narrow_list() {