mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
narrow: Do not mark as read when narrowing by topic or recipient.
Previously, we've been assuming that when a user narrows to a topic or recipient, that the target message would be marked as read in resulting view. This is no longer a safe assumption because a user can have their personal display settings to never mark messages as read, even in conversation views. Removes the call to `unread_ops.notify_server_message_read` in both `narrow.by_topic` and `narrow.by_recipient` in the web app.
This commit is contained in:
committed by
Tim Abbott
parent
65c552e55a
commit
a93598c22e
@@ -925,11 +925,6 @@ export function by_topic(target_id, opts) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't check msg_list.can_mark_messages_read here only because
|
|
||||||
// the target msg_list isn't initialized yet; in any case, the
|
|
||||||
// message is about to be marked read in the new view.
|
|
||||||
unread_ops.notify_server_message_read(original);
|
|
||||||
|
|
||||||
const search_terms = [
|
const search_terms = [
|
||||||
{operator: "stream", operand: original.stream},
|
{operator: "stream", operand: original.stream},
|
||||||
{operator: "topic", operand: original.topic},
|
{operator: "topic", operand: original.topic},
|
||||||
@@ -944,11 +939,6 @@ export function by_recipient(target_id, opts) {
|
|||||||
// don't use message_lists.current as it won't work for muted messages or for out-of-narrow links
|
// don't use message_lists.current as it won't work for muted messages or for out-of-narrow links
|
||||||
const message = message_store.get(target_id);
|
const message = message_store.get(target_id);
|
||||||
|
|
||||||
// We don't check msg_list.can_mark_messages_read here only because
|
|
||||||
// the target msg_list isn't initialized yet; in any case, the
|
|
||||||
// message is about to be marked read in the new view.
|
|
||||||
unread_ops.notify_server_message_read(message);
|
|
||||||
|
|
||||||
switch (message.type) {
|
switch (message.type) {
|
||||||
case "private":
|
case "private":
|
||||||
by("dm", message.reply_to, opts);
|
by("dm", message.reply_to, opts);
|
||||||
|
|||||||
Reference in New Issue
Block a user