forked from mirrors/akkoma-fe
Do not display desktop chat notification when the chat is focused
This commit is contained in:
parent
2c35afeebf
commit
54dea24bb8
1 changed files with 1 additions and 0 deletions
|
@ -2,6 +2,7 @@ import { showDesktopNotification } from '../desktop_notification_utils/desktop_n
|
||||||
|
|
||||||
export const maybeShowChatNotification = (store, chat) => {
|
export const maybeShowChatNotification = (store, chat) => {
|
||||||
if (!chat.lastMessage) return
|
if (!chat.lastMessage) return
|
||||||
|
if (store.rootState.chats.currentChatId === chat.id && !document.hidden) return
|
||||||
|
|
||||||
const opts = {
|
const opts = {
|
||||||
tag: chat.lastMessage.id,
|
tag: chat.lastMessage.id,
|
||||||
|
|
Loading…
Reference in a new issue