mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Render reply
This commit is contained in:
parent
e88ee31991
commit
31573b3599
@ -35,6 +35,18 @@ export class TextMessageView extends BaseMessageView {
|
||||
}
|
||||
container.appendChild(time);
|
||||
});
|
||||
t.mapSideEffect(vm => vm.replyPreviewBody, ({ body, sender, avatar }) => {
|
||||
if (!body) {
|
||||
return;
|
||||
}
|
||||
const replyContainer = t.blockquote([
|
||||
t.a({ className: "link", href: "#" }, "In reply to"),
|
||||
t.a({ className: "pill", href: "#" }, [tag.div({class: `avatar size-12 usercolor${avatar.colorNumber}`}, text(avatar.initial)), sender]), t.br()]);
|
||||
for (const part of body.parts) {
|
||||
replyContainer.appendChild(renderPart(part));
|
||||
}
|
||||
container.insertBefore(replyContainer, container.firstChild);
|
||||
});
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user