mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
fix: Avoid flicker while updating the view with new messages (#2730)
This commit is contained in:
@@ -233,7 +233,7 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
bus.$on('scrollToMessage', () => {
|
bus.$on('scrollToMessage', () => {
|
||||||
setTimeout(() => this.scrollToBottom(), 0);
|
this.$nextTick(() => this.scrollToBottom());
|
||||||
this.makeMessagesRead();
|
this.makeMessagesRead();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ export default {
|
|||||||
this.conversationPanel = this.$el.querySelector('.conversation-panel');
|
this.conversationPanel = this.$el.querySelector('.conversation-panel');
|
||||||
this.setScrollParams();
|
this.setScrollParams();
|
||||||
this.conversationPanel.addEventListener('scroll', this.handleScroll);
|
this.conversationPanel.addEventListener('scroll', this.handleScroll);
|
||||||
this.scrollToBottom();
|
this.$nextTick(() => this.scrollToBottom());
|
||||||
this.isLoadingPrevious = false;
|
this.isLoadingPrevious = false;
|
||||||
},
|
},
|
||||||
removeScrollListener() {
|
removeScrollListener() {
|
||||||
|
|||||||
Reference in New Issue
Block a user