Don't mark all loaded messages before the pointer as read on page load

On page load, the scroll_finished function was being called and
scroll_start_message was -1.  This caused us to mark all messages
that we loaded through the messages initially visible as read.  This
was particularly problematic because message_range iterates over all
message ids between its two arguments.

(imported from commit d93209d466797939cc9dbdbe76d25a5b20195bd2)
This commit is contained in:
Zev Benjamin 2013-05-01 20:43:47 -04:00
parent 7c672e85a9
commit bea819e039
1 changed files with 1 additions and 1 deletions

View File

@ -572,7 +572,7 @@ $(function () {
//
// Make the block not empty to appease jslint
var ignored = true;
} else if (new_selected > scroll_start_message) {
} else if (scroll_start_message !== -1 && new_selected > scroll_start_message) {
mark_read_between(current_msg_list, scroll_start_message, new_selected);
}
scroll_start_message = undefined;