1
0
mirror of https://akkoma.dev/lamp/akkoma-fe.git synced 2025-08-04 18:31:52 -04:00

Do not display desktop chat notification when the chat is focused

This commit is contained in:
eugenijm 2020-07-13 15:48:19 +03:00
parent 2c35afeebf
commit 54dea24bb8

@ -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,