Skip to content

Commit

Permalink
fix: ajuste scroll para mensagens recebidas
Browse files Browse the repository at this point in the history
Resolve #47
  • Loading branch information
ldurans committed Nov 17, 2022
1 parent 99c9504 commit 3c83796
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/atendimento/mixinCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
scrollToBottom () {
setTimeout(() => {
this.$root.$emit('scrollToBottomMessageChat')
}, 400)
}, 200)
},
dataInWords (date) {
return format(parseJSON(date), 'HH:mm', { locale: pt })
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/atendimento/mixinSockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
scrollToBottom () {
setTimeout(() => {
this.$root.$emit('scrollToBottomMessageChat')
}, 400)
}, 200)
},
socketMessagesList () {

Expand Down Expand Up @@ -81,6 +81,7 @@ export default {
socket.on(`${usuario.tenantId}:ticketList`, data => {
if (data.type === 'chat:create') {
this.$store.commit('UPDATE_MESSAGES', data.payload)
this.scrollToBottom()
}

if (data.type === 'chat:ack' || data.type === 'chat:delete') {
Expand Down

0 comments on commit 3c83796

Please sign in to comment.