When the user long-presses Send in the main chat and the composed text passes the same rich-markdown gate used at send time (richMarkdownAttributeIfNeeded), the send-options preview bubble renders the message as rich InstantPage content, crossfading from the raw text as the menu animates in. Plain text and custom chat contents / edit previews are unchanged. ChatSendMessageActionUI cannot depend on InstantPageUI (it closes a dependency cycle via LocationUI -> AttachmentUI -> ... -> ChatTextInputActionButtonsNode), so the rich view is built in TelegramUI (ChatSendMessageRichTextPreview, wrapping InstantPageV2View + the outgoing message theme) and injected into the screen via a new ChatSendMessageContextScreenRichTextPreview protocol, mirroring the existing media-preview pattern. The main-chat send call site classifies the compose text and injects the preview; MessageItemView lays it out within the send-button-bounded bubble envelope and crossfades between the raw text and the rich layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Sources | ||
| BUILD | ||