mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
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:
parent
3a93c8cc90
commit
200fd7ff70
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user