Telegram-iOS/submodules/BrowserUI/Sources
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
..
BrowserAddressBarComponent.swift Glass 2026-01-25 00:31:18 +08:00
BrowserAddressListComponent.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
BrowserAddressListItemComponent.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
BrowserBookmarksScreen.swift Various improvements 2026-05-28 16:50:05 +02:00
BrowserContent.swift Local instant view 2024-08-29 11:44:05 +04:00
BrowserDocumentContent.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
BrowserExceptionDomainAlertContentNode.swift Postbox -> TelegramEngine wave 6: unused import Postbox batch sweep 2026-04-19 23:46:13 +02:00
BrowserFontSizeContextMenuItem.swift Initial in-app browser implementation 2023-02-18 00:59:18 +04:00
BrowserInstantPageContent.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
BrowserMarkdown.swift Implement textDate autoformatter for InstantPage V2 rich bubbles 2026-06-04 13:45:48 +02:00
BrowserNavigationBarComponent.swift Various improvements 2026-02-19 21:53:26 +04:00
BrowserPdfContent.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
BrowserReadability.swift Implement textDate autoformatter for InstantPage V2 rich bubbles 2026-06-04 13:45:48 +02:00
BrowserRecentlyVisited.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
BrowserScreen.swift Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
BrowserSearchBarComponent.swift Various improvements 2025-12-29 10:05:51 +04:00
BrowserTitleBarComponent.swift Glass 2026-01-25 00:31:18 +08:00
BrowserToolbarComponent.swift Various improvements 2026-04-22 23:03:51 +02:00
BrowserWebContent.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
InstantPageToMarkdown.swift Custom emoji in markdown rich messages (send + round-trip) 2026-05-31 17:51:37 +02:00
SectionHeaderComponent.swift Browser improvements 2024-07-25 17:04:44 +02:00
Utils.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00