unread_ops: Don't read messages when any overlay is open.

Messages are automatically marked read when all the messages in
the current narrow are visible. While this is handy, this is
should not happen when any of the overlays are open.
This commit is contained in:
Aman Agrawal
2020-06-17 19:08:32 +05:30
committed by Tim Abbott
parent a0eb26951c
commit 3d8181455b

View File

@@ -83,7 +83,7 @@ exports.notify_server_message_read = function (message, options) {
// If we ever materially change the algorithm for this function, we
// may need to update notifications.received_messages as well.
exports.process_visible = function () {
if (!notifications.window_has_focus()) {
if (overlays.is_active() || !notifications.window_has_focus()) {
return;
}