Select the first ever message the user receives

(imported from commit 0fd6fa03175d9787a5e5a93d6172309a5eb47bfc)
This commit is contained in:
Zev Benjamin 2012-11-05 18:31:51 -05:00
parent df10d184a7
commit 9875164908
1 changed files with 5 additions and 0 deletions

View File

@ -461,6 +461,11 @@ function add_messages(messages, where) {
{then_scroll: true, update_server: false});
}
if ((selected_message_id === -1) && ! have_initial_messages) {
select_message_by_id(message_array[0].id,
{then_scroll: false, update_server: true});
}
// If we prepended messages, then we need to scroll back to the pointer.
// This will mess with the user's scrollwheel use; possibly we should be
// more clever here. However (for now) we only prepend on page load,