Telegram-iOS/submodules/TelegramCore/FlatSerialization/Models
isaac a731f8bdc0 Implement textDate autoformatter for InstantPage V2 rich bubbles
Render RichText.textDate (API constructor textDate(flags, text, date)) as a
locale/timezone-correct, relative-aware, tappable date inside V2 rich-message
bubbles, reusing the existing stringForEntityFormattedDate autoformatter.

- Model: add RichText.textDate(text📅format:) with Postbox coding,
  FlatBuffers schema (RichText.fbs; flatc regenerates), Equatable and plainText;
  parse flags->DateTimeFormat? at the API boundary (flags==0 => nil, matching
  the messageEntityFormattedDate convention) with a symmetric apiRichText()
  round-trip. The new case is handled in every exhaustive RichText switch
  (SyncCore, ApiUtils, InstantPageTextItem, InstantPageAnchorPath,
  InstantPagePreviewText, BrowserReadability, BrowserMarkdown).
- Render: attributedStringForRichText gains an optional formatDate closure;
  the V2 layout builds it from the message's strings/dateTimeFormat and threads
  it to every text-building call site, formatting the timestamp and tagging the
  run with TelegramTextAttributes.Date.
- Tappable: the Date attribute is added to linkSelectionRects hit-testing and
  mapped in the rich bubble's entityTapContent to the existing .date tap action
  (opens the date context menu).
- Live update: the V2 layout accumulates a page-wide formattedDateUpdatePeriod
  (>=10s) for relative dates; the rich bubble schedules a refresh timer on it,
  recreating it only when the period changes. The currentPageLayout cache is
  bypassed for relative-date pages so the timer-driven relayout actually
  re-formats the date.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:45:48 +02:00
..
InstantPage.fbs Various improvements 2025-02-21 16:17:15 +01:00
InstantPageBlock.fbs Implement InstantPageBlock.thinking (pageBlockThinking) parsing & serialization 2026-05-29 16:07:09 +02:00
ItemCollectionId.fbs Various optimizations 2025-03-04 14:13:07 +01:00
Media.fbs Various improvements 2025-02-21 16:17:15 +01:00
MediaId.fbs
MessageId.fbs
Optional.fbs Various improvements 2025-02-21 16:17:15 +01:00
PartialMediaReference.fbs Various improvements 2025-08-22 21:46:07 +04:00
PeerAccessRestrictionInfo.fbs Various improvements 2025-02-21 16:17:15 +01:00
PeerCollectibleColor.fbs Update API [skip ci] 2025-09-19 12:20:21 +04:00
PeerEmojiStatus.fbs Various improvements 2025-02-21 16:17:15 +01:00
PeerId.fbs
PeerNameColor.fbs Various improvements 2025-02-21 16:17:15 +01:00
PeerReference.fbs
PixelDimensions.fbs
RichText.fbs Implement textDate autoformatter for InstantPage V2 rich bubbles 2026-06-04 13:45:48 +02:00
StarsAmount.fbs Various improvements 2025-02-21 16:17:15 +01:00
StickerPackCollectionInfo.fbs Various optimizations 2025-03-04 14:13:07 +01:00
StickerPackReference.fbs Various improvements 2025-06-29 18:15:50 +02:00
StoredDeviceContactData.fbs New address book implementation 2025-07-09 17:47:33 +04:00
TelegramChannel.fbs Bot forums v2 2025-09-05 15:25:50 +02:00
TelegramChatAdminRights.fbs Various improvements 2025-02-21 16:17:15 +01:00
TelegramChatBannedRights.fbs Various improvements 2025-02-21 16:17:15 +01:00
TelegramGroup.fbs Various improvements 2025-02-21 16:17:15 +01:00
TelegramMediaFile.fbs
TelegramMediaFileAttribute.fbs
TelegramMediaImage.fbs Update API 2026-03-09 14:32:10 +01:00
TelegramMediaImageRepresentation.fbs
TelegramMediaResource.fbs
TelegramPeerAccessHash.fbs Various improvements 2025-02-21 16:17:15 +01:00
TelegramPeerUsername.fbs Various improvements 2025-02-21 16:17:15 +01:00
TelegramUser.fbs Update API [skip ci] 2025-09-19 12:20:21 +04:00
VideoThumbnail.fbs