fix(conversation): restore scroll-to-bottom after switching conversations (#250)
The scheduled-messages refactor (9a05ff524) split setActiveChat into
two branches but dropped the .then() callback that emits
SCROLL_TO_MESSAGE for normal conversation loads (no messageId).
Without this event scrollToBottom() never fires after messages load,
leaving the scroll at the top and triggering infinite history fetch.
This commit is contained in:
parent
3aba6affd4
commit
8728db8869
@ -194,9 +194,13 @@ export default {
|
||||
emitter.emit(BUS_EVENTS.SCROLL_TO_MESSAGE, { messageId });
|
||||
});
|
||||
} else {
|
||||
this.$store.dispatch('setActiveChat', {
|
||||
data: selectedConversation,
|
||||
});
|
||||
this.$store
|
||||
.dispatch('setActiveChat', {
|
||||
data: selectedConversation,
|
||||
})
|
||||
.then(() => {
|
||||
emitter.emit(BUS_EVENTS.SCROLL_TO_MESSAGE);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$store.dispatch('clearSelectedState');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user