fix chats fetcher again

This commit is contained in:
Henry Jameson 2026-08-26 18:38:33 +03:00
commit 713eb828c8

View file

@ -81,11 +81,11 @@ export const useChatsStore = defineStore('chats', {
chat.lastMessage = updatedChat.lastMessage
chat.unread = updatedChat.unread
chat.updated_at = updatedChat.updated_at
if (!isNewMessage) return
if (isNewMessage) maybeShowChatNotification(chat)
} else {
this.data.set(updatedChat.id, updatedChat)
maybeShowChatNotification(updatedChat)
}
maybeShowChatNotification(chat)
},
deleteChat(id) {
this.data.delete(id)