mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
fix: Do not reset the scroll if there is no new message (#5108)
This commit is contained in:
@@ -87,7 +87,6 @@
|
|||||||
:selected-tweet="selectedTweet"
|
:selected-tweet="selectedTweet"
|
||||||
:popout-reply-box.sync="isPopoutReplyBox"
|
:popout-reply-box.sync="isPopoutReplyBox"
|
||||||
@click="showPopoutReplyBox"
|
@click="showPopoutReplyBox"
|
||||||
@scrollToMessage="scrollToBottom"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -117,11 +117,16 @@ export default {
|
|||||||
},
|
},
|
||||||
setActiveChat() {
|
setActiveChat() {
|
||||||
if (this.conversationId) {
|
if (this.conversationId) {
|
||||||
const chat = this.findConversation();
|
const selectedConversation = this.findConversation();
|
||||||
if (!chat) {
|
// If conversation doesn't exist or selected conversation is same as the active
|
||||||
|
// conversation, don't set active conversation.
|
||||||
|
if (
|
||||||
|
!selectedConversation ||
|
||||||
|
selectedConversation.id === this.currentChat.id
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('setActiveChat', chat).then(() => {
|
this.$store.dispatch('setActiveChat', selectedConversation).then(() => {
|
||||||
bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE);
|
bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user