Commit graph

69 commits

Author SHA1 Message Date
isaac
35711ec6ad Localize rich-text message preview labels; split audio into voice/music
Thread PresentationStrings through RichText/InstantPageBlock/InstantPage
previewText(), replacing the hardcoded //TODO:localize placeholders
("Photo", "Fx", "Table", "Map", ...) with localized keys and reusing the
existing Message.Photo/Video/Location strings. Add RichTextPreview.Formula
("[formula]"), RichTextPreview.Table ("[table]"), and RichTextPreview.Music
("Music").

The .audio block previously rendered the wrong label (Message.Audio is
"Voice Message"). Thread InstantPage.media down so the block can resolve
media[id] as TelegramMediaFile and split: isVoice -> "Voice Message",
otherwise -> "Music", mirroring MessageContentKind's voice/music handling.

Update both previewText() call sites (MessageContentKind, ChatListItemStrings)
to pass strings, and complete the InstantPageListItem migration that was
left on the old signature.

Also remove the dead streaming-status ("Thinking...") rendering block from
ChatMessageTextBubbleContentNode (guarded by an always-false `!"".isEmpty`)
along with the now-orphaned streamingTextFrame layout machinery it fed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:18:24 +02:00
isaac
a9f8b0d067 Make rich messages editable via InstantPage↔markdown round-trip
Reconstruct markdown source from a stored InstantPage to populate the edit
field, then re-classify on save (the inverse of the send path). Adds the
InstantPageToMarkdown converter, edit-field population and save-time
re-classification in ChatControllerLoadDisplayNode, and a shared InstantPage
previewText surfaced through MessageContentKind for reply/pinned/forward
previews. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 23:10:48 +02:00
isaac
8b9f498d53 RichText.textSpoiler: dust overlay + tap-to-reveal in rich-data bubbles
Add the RichText.textSpoiler case end-to-end: model + Postbox coding,
FlatBuffers schema/codec, and Api.RichText parsing/serialization (lossless).
Display attaches the spoiler attribute, collects per-line spoiler rects in
the V2 layout, clips obscured glyphs and draws an energy-gated dust overlay
in the V2 text view, propagates the reveal flag across the nested V2 tree
(building dust for freshly-created text views), and wires tap-to-reveal
routing in the rich-data bubble.

Also seeds the streaming reveal cursor across chunk rebuilds and refines
status date positioning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 22:12:47 +04:00
isaac
99e4c41b24 RichText: entity cases (mention / hashtag / cashtag / bot command / bank card / auto link)
Implement the nine message-entity RichText cases (textMention,
textMentionName, textHashtag, textCashtag, textBotCommand, textBankCard,
textAutoUrl, textAutoEmail, textAutoPhone): model + Postbox coding,
FlatBuffers schema/codec, Api.RichText parsing/serialization (lossless),
InstantPage display attaching the matching TelegramTextAttributes keys, and
tap routing in the rich-data bubble mirroring ChatMessageTextBubbleContentNode.
mentionName display resolves via EnginePeer.Id (PeerId not in scope).

Also lets rich-data text selection reach a line's trailing edge and fixes
the date/status node positioning to match TextBubble.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 22:12:47 +04:00
isaac
b48b96ecd9 RichText.textCustomEmoji: inline animated custom emoji in rich-data bubbles
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>
2026-05-23 22:12:47 +04:00
isaac
3f09a1f325 WIP 2026-05-20 00:34:25 +08:00
isaac
13a153aff2 WIP 2026-05-20 00:33:08 +08:00
Ilya Laktyushin
3c6ea30767 Various fixes 2026-04-26 01:07:12 +02:00
Ilya Laktyushin
dbd40fe7d3 Various improvements 2026-04-22 23:03:51 +02:00
Isaac
f3e1795b68 Temp 2026-04-07 08:11:27 +02:00
Ilya Laktyushin
ed55943a44 Various improvements 2026-03-27 01:13:38 +01:00
Ilya Laktyushin
e11c9899e6 Various fixes 2026-03-23 15:03:50 +01:00
Ilya Laktyushin
66d08c0e1b Various improvements 2026-03-22 13:44:04 +01:00
Isaac
e4e5142a96 Various improvements 2026-03-10 17:50:37 +01:00
Ilya Laktyushin
713f557e64 Update API 2026-03-09 14:32:10 +01:00
Ilya Laktyushin
2c4c9a9d9b [WIP] Live photos 2026-02-20 13:28:58 +04:00
Ilya Laktyushin
21995065d6 Various fixes 2026-01-08 00:20:56 +04:00
Ilya Laktyushin
41ae916106 Various improvements 2025-06-08 18:28:49 +02:00
Isaac
c7269fa310 Conference updates 2025-04-15 17:49:31 +04:00
Isaac
700a71f393 Update localization 2025-04-09 18:21:11 +04:00
Isaac
aaf52d4282 Conference calls 2025-03-30 02:06:50 +04:00
Isaac
923587b0da [WIP] Dynamic video streaming 2024-09-18 01:04:29 +08:00
Ilya Laktyushin
3e448e833e Story covers 2024-07-19 17:43:17 +04:00
Ilya Laktyushin
b5b052ff7d Paid media improvements 2024-06-22 00:05:21 +04:00
Ilya Laktyushin
40a4183095 Paid media content 2024-06-18 18:57:32 +04:00
Isaac
ba55877c44 Poll emoji improvements 2024-04-22 19:21:35 +04:00
Ilya Laktyushin
5e92cc90e4 Group boosts 2024-02-10 16:21:17 +04:00
Ilya Laktyushin
6b2698a362 Group boosts 2024-02-08 17:54:33 +04:00
Ilya Laktyushin
ef28f034d8 Various improvements 2023-12-13 01:00:55 +04:00
Ilya Laktyushin
5d26ed41c4 Cherry-pick various improvements 2023-11-08 16:44:46 +04:00
Ilya Laktyushin
c8c08d5e33 Cherry-pick various improvements 2023-11-06 23:19:22 +04:00
Ali
af8474aca5 [WIP] Quotes and link previews 2023-10-18 01:11:23 +04:00
Ilya Laktyushin
713336a13f Giveaway improvements 2023-10-08 14:12:39 +04:00
Ali
295ba9541b Localization 2023-07-16 19:32:01 +04:00
Ali
875ad20c6d Localization 2023-07-16 18:13:43 +04:00
Ali
84dcde0051 Stories 2023-06-30 19:48:37 +02:00
Ali
434e9dd22d Story improvements 2023-06-09 20:17:50 +04:00
Ali
969724de40 [WIP] Stories 2023-05-23 23:53:43 +04:00
Ilya Laktyushin
cd9026f55b Various fixes 2023-03-23 20:04:09 +04:00
Ali
38c0fd0bf2 Fix peer restriction handling 2022-11-04 23:47:20 +04:00
Ali
7608829e2d Fix chat list message hiding 2022-11-04 23:34:52 +04:00
Ali
554cd0e6fe Topic improvements + interval ads 2022-10-29 00:26:57 +04:00
Ali
99396ec7d4 [WIP] Topics 2022-10-20 20:57:11 +04:00
Ali
7b663a3445 Emoji input improvements 2022-07-22 02:12:10 +02:00
Ilya Laktyushin
6724b422fa Various Fixes 2022-01-11 15:44:05 +03:00
Ilya Laktyushin
76f355f27a Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2021-09-25 17:22:08 +03:00
Ilya Laktyushin
c849e63392 Various Fixes 2021-09-25 17:02:36 +03:00
Ali
3eead87254 Refactoring 2021-09-23 18:59:10 +03:00
Ali
b778c66226 Refactoring 2021-09-20 23:07:38 +03:00
Ali
6e5c503338 Refactoring 2021-09-20 14:51:46 +03:00