fix marking chat as read
This commit is contained in:
parent
a659063fc2
commit
61f25e4f0f
1 changed files with 2 additions and 1 deletions
|
|
@ -248,6 +248,7 @@ const Chat = {
|
||||||
useUsersStore().addNewUsers({ ...result, data: data.account })
|
useUsersStore().addNewUsers({ ...result, data: data.account })
|
||||||
data.account = useUsersStore().findUser(data.account.id)
|
data.account = useUsersStore().findUser(data.account.id)
|
||||||
this.chat = data
|
this.chat = data
|
||||||
|
this.maxId = this.chat.lastMessage?.id
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error creating or getting a chat', e)
|
console.error('Error creating or getting a chat', e)
|
||||||
this.errorLoadingChat = true
|
this.errorLoadingChat = true
|
||||||
|
|
@ -255,10 +256,10 @@ const Chat = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isConversation || this.chat) {
|
if (this.isConversation || this.chat) {
|
||||||
|
this.startFetching('Chat activated', true)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollDown({ forceRead: true })
|
this.scrollDown({ forceRead: true })
|
||||||
})
|
})
|
||||||
this.startFetching('Chat activated', true)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deactivate() {
|
deactivate() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue