Prevent reply previews from being nested

This commit is contained in:
RMidhunSuresh 2021-12-20 11:16:53 +05:30
parent 4d63b41127
commit 4df3654166

View file

@ -26,7 +26,15 @@ export class TextMessageView extends BaseMessageView {
"Timeline_messageBody": true, "Timeline_messageBody": true,
statusMessage: vm => vm.shape === "message-status", statusMessage: vm => vm.shape === "message-status",
} }
}, t.mapView(vm => vm.replyTextTile, replyTextTile => replyTextTile ? new ReplyPreviewView(replyTextTile) : null)); }, t.mapView(vm => vm.replyTextTile, replyTextTile => {
if (replyTextTile && this._interactive) {
// if this._interactive = false, this is already a reply preview, don't nest replies for now.
return new ReplyPreviewView(replyTextTile);
}
else {
return null;
}
}));
t.mapSideEffect(vm => vm.body, body => { t.mapSideEffect(vm => vm.body, body => {
while (this._shouldRemove(container.lastChild)) { while (this._shouldRemove(container.lastChild)) {