mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Fix the selected message when narrowing to a stream that has no messages loaded
We would previously scroll you to the top of the just-loaded block of messages (imported from commit 520e5588aa078313649677663c7feea4ca1d7145)
This commit is contained in:
@@ -39,7 +39,13 @@ function parse_narrow(hash) {
|
||||
var operand = decodeURIComponent(hash[i+1] || '');
|
||||
operators.push([operator, operand]);
|
||||
}
|
||||
narrow.activate(operators, {target_id: initial_pointer});
|
||||
var new_selection;
|
||||
if (current_msg_list.selected_id() !== -1) {
|
||||
new_selection = current_msg_list.selected_id();
|
||||
} else {
|
||||
new_selection = initial_pointer;
|
||||
}
|
||||
narrow.activate(operators, {then_select_id: new_selection});
|
||||
}
|
||||
|
||||
// Returns true if this function performed a narrow
|
||||
|
||||
Reference in New Issue
Block a user