fix chats fetcher again
This commit is contained in:
parent
7c46ba462f
commit
713eb828c8
1 changed files with 2 additions and 2 deletions
|
|
@ -81,11 +81,11 @@ export const useChatsStore = defineStore('chats', {
|
||||||
chat.lastMessage = updatedChat.lastMessage
|
chat.lastMessage = updatedChat.lastMessage
|
||||||
chat.unread = updatedChat.unread
|
chat.unread = updatedChat.unread
|
||||||
chat.updated_at = updatedChat.updated_at
|
chat.updated_at = updatedChat.updated_at
|
||||||
if (!isNewMessage) return
|
if (isNewMessage) maybeShowChatNotification(chat)
|
||||||
} else {
|
} else {
|
||||||
this.data.set(updatedChat.id, updatedChat)
|
this.data.set(updatedChat.id, updatedChat)
|
||||||
|
maybeShowChatNotification(updatedChat)
|
||||||
}
|
}
|
||||||
maybeShowChatNotification(chat)
|
|
||||||
},
|
},
|
||||||
deleteChat(id) {
|
deleteChat(id) {
|
||||||
this.data.delete(id)
|
this.data.delete(id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue