fix: Avoid flicker while updating the view with new messages (#2730)

This commit is contained in:
Pranav Raj S
2021-08-02 08:03:12 +05:30
committed by GitHub
parent e46aa1aa64
commit bfa00cc12d

View File

@@ -233,7 +233,7 @@ export default {
created() {
bus.$on('scrollToMessage', () => {
setTimeout(() => this.scrollToBottom(), 0);
this.$nextTick(() => this.scrollToBottom());
this.makeMessagesRead();
});
@@ -255,7 +255,7 @@ export default {
this.conversationPanel = this.$el.querySelector('.conversation-panel');
this.setScrollParams();
this.conversationPanel.addEventListener('scroll', this.handleScroll);
this.scrollToBottom();
this.$nextTick(() => this.scrollToBottom());
this.isLoadingPrevious = false;
},
removeScrollListener() {