Fix reply nesting

This commit is contained in:
RMidhunSuresh 2022-01-10 18:32:03 +05:30
parent f9f7f6cc6f
commit 28a534ee49

View File

@ -27,11 +27,14 @@ export class TextMessageView extends BaseMessageView {
statusMessage: vm => vm.shape === "message-status", statusMessage: vm => vm.shape === "message-status",
} }
}, t.mapView(vm => vm.replyTile, replyTile => { }, t.mapView(vm => vm.replyTile, replyTile => {
if (vm.isReply && !replyTile) { if (this._isReplyPreview) {
// if this._isReplyPreview = true, this is already a reply preview, don't nest replies for now.
return null;
}
else if (vm.isReply && !replyTile) {
return new ReplyPreviewError(); return new ReplyPreviewError();
} }
else if (replyTile && !this._isReplyPreview) { else if (replyTile) {
// if this._isReplyPreview = true, this is already a reply preview, don't nest replies for now.
return new ReplyPreviewView(replyTile); return new ReplyPreviewView(replyTile);
} }
else { else {