Revert "feat: remove click action"
This reverts commit 39e748bd739d8849a01e51b78e5db3c440d7c803.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
:message="inReplyTo"
|
||||
:message-type="data.message_type"
|
||||
:parent-has-attachments="hasAttachments"
|
||||
@click="navigateToMessage"
|
||||
/>
|
||||
<bubble-text
|
||||
v-if="data.content"
|
||||
@@ -519,6 +520,21 @@ export default {
|
||||
this.showBackgroundHighlight = false;
|
||||
}, 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',
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user