Mark messages as read when using the End key

(imported from commit b2495cb27b1362d037e786db7f108540f2ce655b)
This commit is contained in:
Leo Franchi
2013-04-23 11:58:02 -04:00
parent de44f08772
commit d0b8a2fd21
4 changed files with 17 additions and 9 deletions

View File

@@ -419,6 +419,17 @@ function process_visible_unread_messages() {
}
}
function mark_read_between(msg_list, start_id, end_id) {
var mark_as_read = [];
$.each(message_range(msg_list, start_id, end_id),
function (idx, msg) {
if (message_unread(msg)) {
mark_as_read.push(msg);
}
});
process_read_messages(mark_as_read);
}
function send_pointer_update() {
if (!pointer_update_in_flight &&
furthest_read > server_furthest_read) {