Revert "feat: remove click action"

This reverts commit 39e748bd739d8849a01e51b78e5db3c440d7c803.
This commit is contained in:
Shivam Mishra
2023-11-30 13:08:49 +05:30
parent 20dac9d77b
commit 9cc6275c82
4 changed files with 27 additions and 2 deletions
@@ -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>