mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-06-20 18:24:43 +00:00
b48b96ecd9
Add the RichText.textCustomEmoji(fileId:alt:) case end-to-end: model + Postbox coding, FlatBuffers schema/codec, and Api.RichText parsing/serialization (lossless), plus display in the InstantPage V2 renderer. The emoji renders as an InlineStickerItemLayer that participates in the streaming reveal (pops in as the reveal cursor crosses it) and is gated by the bubble's visibility rect, propagated recursively through the nested V2 view tree. Also frees the CTRunDelegate extent buffers for the image/formula/custom-emoji attachment arms and documents the feature in CLAUDE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
107 lines
1.9 KiB
Plaintext
107 lines
1.9 KiB
Plaintext
include "MediaId.fbs";
|
|
include "PixelDimensions.fbs";
|
|
|
|
namespace TelegramCore;
|
|
|
|
union RichText_Value {
|
|
RichText_Empty,
|
|
RichText_Plain,
|
|
RichText_Bold,
|
|
RichText_Italic,
|
|
RichText_Underline,
|
|
RichText_Strikethrough,
|
|
RichText_Fixed,
|
|
RichText_Url,
|
|
RichText_Email,
|
|
RichText_Concat,
|
|
RichText_Subscript,
|
|
RichText_Superscript,
|
|
RichText_Marked,
|
|
RichText_Phone,
|
|
RichText_Image,
|
|
RichText_Anchor,
|
|
RichText_Formula,
|
|
RichText_CustomEmoji
|
|
}
|
|
|
|
table RichText {
|
|
value:RichText_Value (id: 1, required);
|
|
}
|
|
|
|
table RichText_Empty {}
|
|
|
|
table RichText_Plain {
|
|
text:string (id: 0, required);
|
|
}
|
|
|
|
table RichText_Bold {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Italic {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Underline {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Strikethrough {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Fixed {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Url {
|
|
text:RichText (id: 0, required);
|
|
url:string (id: 1, required);
|
|
webpageId:MediaId (id: 2);
|
|
}
|
|
|
|
table RichText_Email {
|
|
text:RichText (id: 0, required);
|
|
email:string (id: 1, required);
|
|
}
|
|
|
|
table RichText_Concat {
|
|
texts:[RichText] (id: 0, required);
|
|
}
|
|
|
|
table RichText_Subscript {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Superscript {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Marked {
|
|
text:RichText (id: 0, required);
|
|
}
|
|
|
|
table RichText_Phone {
|
|
text:RichText (id: 0, required);
|
|
phone:string (id: 1, required);
|
|
}
|
|
|
|
table RichText_Image {
|
|
id:MediaId (id: 0, required);
|
|
dimensions:PixelDimensions (id: 1, required);
|
|
}
|
|
|
|
table RichText_Anchor {
|
|
text:RichText (id: 0, required);
|
|
name:string (id: 1, required);
|
|
}
|
|
|
|
table RichText_Formula {
|
|
latex:string (id: 0, required);
|
|
}
|
|
|
|
table RichText_CustomEmoji {
|
|
fileId:long (id: 0);
|
|
alt:string (id: 1, required);
|
|
}
|