fix: reply-to preview not working on next bubbles (#10649)
This commit is contained in:
@@ -58,14 +58,14 @@ const messageClass = computed(() => {
|
|||||||
|
|
||||||
const scrollToMessage = () => {
|
const scrollToMessage = () => {
|
||||||
emitter.emit(BUS_EVENTS.SCROLL_TO_MESSAGE, {
|
emitter.emit(BUS_EVENTS.SCROLL_TO_MESSAGE, {
|
||||||
messageId: this.message.id,
|
messageId: inReplyTo.value.id,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const previewMessage = computed(() => {
|
const replyToPreview = computed(() => {
|
||||||
if (!inReplyTo) return '';
|
if (!inReplyTo) return '';
|
||||||
|
|
||||||
const { content, attachments } = inReplyTo;
|
const { content, attachments } = inReplyTo.value;
|
||||||
|
|
||||||
if (content) return content;
|
if (content) return content;
|
||||||
if (attachments?.length) {
|
if (attachments?.length) {
|
||||||
@@ -91,11 +91,11 @@ const previewMessage = computed(() => {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="inReplyTo"
|
v-if="inReplyTo"
|
||||||
class="bg-n-alpha-black1 rounded-lg p-2"
|
class="bg-n-alpha-black1 rounded-lg p-2 -mx-1 mb-2 cursor-pointer"
|
||||||
@click="scrollToMessage"
|
@click="scrollToMessage"
|
||||||
>
|
>
|
||||||
<span class="line-clamp-2">
|
<span class="line-clamp-2">
|
||||||
{{ previewMessage }}
|
{{ replyToPreview }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
Reference in New Issue
Block a user