mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 16:57:39 +00:00
RenderTextParagraph previously assembled each word/segment as a separate composable inside a FlowRow. It now outputs a single Text() composable with a built AnnotatedString and an InlineTextContent map so images, videos, and custom emojis are shown inline within the text flow: - Images and videos (with preview): InlineTextContent with a fixed-size media placeholder (300×200 sp) containing ZoomableContentView - Custom emojis: InlineTextContent with emoji-sized placeholder per image glyph via CustomEmoji.assembleAnnotatedList - Hashtags: LinkAnnotation.Clickable span + optional InlineTextContent icon for decorated hashtags (#bitcoin, #nostr, etc.) - Clickable URLs, emails (mailto:), phones (tel:): LinkAnnotation.Url spans with primary-colour styling - Block-level widgets (URL previews, invoices, LNURL withdraw, Cashu, secret emojis, Nostr note/profile references): InlineTextContent with a 300×300 sp block placeholder - User/event tag references without quote preview: InlineTextContent with a narrow text-height reference placeholder (150 sp × emojiSize) The spaceWidth / measureSpaceWidth plumbing is removed from RenderTextParagraph and its callers (RenderRegular callback no longer receives Dp). measureSpaceWidth is kept because Highlight.kt still uses it for its own FlowRow layout. RenderWordWithPreview, RenderWordWithoutPreview, the private ZoomableContentView string-URL wrapper, RenderCustomEmoji, and NoProtocolUrlRenderer are all inlined into RenderTextParagraph and removed. HashtagIcon.kt @Preview is updated to the new API. https://claude.ai/code/session_01TtfLvFoR5Qpr2bHBWr5z3f