From 54dea24bb8b34021debdb2ab505a2e0b5b770ed9 Mon Sep 17 00:00:00 2001 From: eugenijm Date: Mon, 13 Jul 2020 15:48:19 +0300 Subject: [PATCH] Do not display desktop chat notification when the chat is focused --- src/services/chat_utils/chat_utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/chat_utils/chat_utils.js b/src/services/chat_utils/chat_utils.js index 7264ebcc..ab898ced 100644 --- a/src/services/chat_utils/chat_utils.js +++ b/src/services/chat_utils/chat_utils.js @@ -2,6 +2,7 @@ import { showDesktopNotification } from '../desktop_notification_utils/desktop_n export const maybeShowChatNotification = (store, chat) => { if (!chat.lastMessage) return + if (store.rootState.chats.currentChatId === chat.id && !document.hidden) return const opts = { tag: chat.lastMessage.id,