mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
do not await for mark messages as seen
This commit is contained in:
parent
27fe3068e0
commit
4b2fae9a2c
@ -260,19 +260,22 @@ export default {
|
||||
|
||||
const newMsgIds = Message.filter((m) => m.seen === false).map((m) => m.id)
|
||||
if (newMsgIds.length) {
|
||||
await this.$apollo.mutate({
|
||||
mutation: markMessagesAsSeen(),
|
||||
variables: {
|
||||
messageIds: newMsgIds,
|
||||
},
|
||||
})
|
||||
this.$apollo
|
||||
.query({
|
||||
query: unreadRoomsQuery(),
|
||||
fetchPolicy: 'network-only',
|
||||
.mutate({
|
||||
mutation: markMessagesAsSeen(),
|
||||
variables: {
|
||||
messageIds: newMsgIds,
|
||||
},
|
||||
})
|
||||
.then(({ data: { UnreadRooms } }) => {
|
||||
this.commitUnreadRoomCount(UnreadRooms)
|
||||
.then(() => {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: unreadRoomsQuery(),
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
.then(({ data: { UnreadRooms } }) => {
|
||||
this.commitUnreadRoomCount(UnreadRooms)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user