fix: Do not reset the scroll if there is no new message (#5108)
This commit is contained in:
parent
885fcf667c
commit
d57dc41cee
2 changed files with 8 additions and 4 deletions
|
@ -87,7 +87,6 @@
|
|||
:selected-tweet="selectedTweet"
|
||||
:popout-reply-box.sync="isPopoutReplyBox"
|
||||
@click="showPopoutReplyBox"
|
||||
@scrollToMessage="scrollToBottom"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -117,11 +117,16 @@ export default {
|
|||
},
|
||||
setActiveChat() {
|
||||
if (this.conversationId) {
|
||||
const chat = this.findConversation();
|
||||
if (!chat) {
|
||||
const selectedConversation = this.findConversation();
|
||||
// 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;
|
||||
}
|
||||
this.$store.dispatch('setActiveChat', chat).then(() => {
|
||||
this.$store.dispatch('setActiveChat', selectedConversation).then(() => {
|
||||
bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE);
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue