refactor: move fetching logic to onScrollToMessage
This commit is contained in:
@@ -521,17 +521,9 @@ export default {
|
||||
}, HIGHLIGHT_TIMER);
|
||||
},
|
||||
async navigateToMessage() {
|
||||
// TODO: check if the message is already loaded
|
||||
await this.$store.dispatch('setActiveChat', {
|
||||
data: this.currentChat,
|
||||
after: this.inReplyToMessageId,
|
||||
force: true,
|
||||
});
|
||||
|
||||
this.$nextTick(() => {
|
||||
bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE, {
|
||||
messageId: this.inReplyToMessageId,
|
||||
behavior: 'instant',
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user