mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
search: Don't mark messages as read in search narrow.
Don't mark unread messages as read while searching. This behavior will be extended to other narrows later. Fixes: #12556.
This commit is contained in:
@@ -28,7 +28,9 @@ exports.down = function (with_centering) {
|
||||
var current_msg_table = rows.get_table(current_msg_list.table_name);
|
||||
message_viewport.scrollTop(current_msg_table.safeOuterHeight(true) -
|
||||
message_viewport.height() * 0.1);
|
||||
unread_ops.mark_current_list_as_read();
|
||||
if (current_msg_list.can_mark_messages_read()) {
|
||||
unread_ops.mark_current_list_as_read();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -54,7 +56,9 @@ exports.to_end = function () {
|
||||
message_viewport.set_last_movement_direction(1);
|
||||
current_msg_list.select_id(next_id, {then_scroll: true,
|
||||
from_scroll: true});
|
||||
unread_ops.mark_current_list_as_read();
|
||||
if (current_msg_list.can_mark_messages_read()) {
|
||||
unread_ops.mark_current_list_as_read();
|
||||
}
|
||||
};
|
||||
|
||||
function amount_to_paginate() {
|
||||
@@ -114,7 +118,9 @@ exports.page_up = function () {
|
||||
exports.page_down = function () {
|
||||
if (message_viewport.at_bottom() && !current_msg_list.empty()) {
|
||||
current_msg_list.select_id(current_msg_list.last().id, {then_scroll: false});
|
||||
unread_ops.mark_current_list_as_read();
|
||||
if (current_msg_list.can_mark_messages_read()) {
|
||||
unread_ops.mark_current_list_as_read();
|
||||
}
|
||||
} else {
|
||||
exports.page_down_the_right_amount();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user