isaac
0050cc7a08
Rich-message media in gallery/shared-media/preview pipelines via Message.effectiveMedia
...
Add Message/EngineMessage.effectiveMedia (= message.media when non-empty, else
richText.instantPage.allMedia()) and route the media-consuming sites through it
so a rich message's instant-page media participates in the same pipelines as
normal message.media: shared-media grids/file-rows, search media grid, gallery
open + item nodes + footer, the peer audio/voice playlist, secret-media preview,
resource-by-id resolution, recent downloads, downloaded-media store, delete-time
resource cleanup, cache-usage stats, the in-chat download manager, and the
context-menu / share actions (Save to Camera Roll, copy image, save audio/music
to files). For normal messages effectiveMedia == message.media, so each swap is
behavior-preserving; rich messages render their own bubble via
ChatMessageRichDataBubbleContentNode (not the text/file bubbles), so those paths
are deliberately untouched, as are the forward path (the attribute travels with
the forward) and the markdown-based rich-edit path. First-media scope for now.
See docs/instantpage-richtext.md for the full architecture + invariants.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:46:56 +02:00
isaac
e918b353ec
Postbox refactor waves 278-356: squash
...
Squashes 79 sequential refactor waves into a single commit.
Highlights:
- Drop `import Postbox` (and matching `//submodules/Postbox` BUILD deps) from a wide swath of consumer files: ChatList, ChatMessage*BubbleContentNode subclasses, ListMessageNode/ListMessageItem, GalleryData, ChatHistorySearchContainerNode, ChatPanelInterfaceInteraction, ChatControllerInteraction, ChatMessageStickerItemNode, ChatMessageReplyInfoNode, ChatMessageInstantVideoItemNode, ChatPresentationInterfaceState, BrowserMarkdown/Readability, MediaResources, LocalMediaResources, ICloudResources, FetchManager, ShareController, OpenChatMessage, GalleryController, GroupStickerSearchContainerNode, GroupStickerPackCurrentItem, ChatPinnedMessageTitlePanelNode, OverlayAudioPlayerController, PresentationThemeSettings, StatisticsUI/StoryIconNode, TextFormat/StringWithAppliedEntities, GalleryUI/VideoAdComponent, StickerPackPreviewUI, WallpaperPreviewMedia, WallpaperResources, YoutubeEmbedImplementation, InstantPageExternalMediaResource, PlatformRestrictionMatching, TelegramUIDeclareEncodables, ChatListNode/ChatListSearchContainerNode.
- Add `TelegramEngine` facades: `Themes.wallpapers`, `Themes.themes`, `AccountData.addAppLogEvent`.
- Add `EngineMessageHistoryEntryLocation` wrapper.
- Add `EngineRaw*` escape-hatch typealiases (`EngineRawMessage`, `EngineRawPeer`, `EngineRawMedia`, `EngineRawMediaResource`, `EngineRawMediaResourceData`, `EngineRawItemCollectionItem`, `EngineRawItemCollectionInfo`) and `engineDeclareEncodable` forwarder.
- Drop unused `account:`/`postbox:`/`network:` parameters from several public functions and delete the dead overloads/types/functions left over: `automaticThemeShouldSwitchNow`, `cancelFreeMediaFileInteractiveFetch`, `legacyEnqueueVideoMessage`, `TelegramMediaFileReference`, plus assorted dead public TelegramCore/AccountContext SecureId entry points.
- Delete entire dead modules: `LegacyDataImport`, `TonBinding`, `SpotlightSupport`, `SvgRendering`, third-party `AppCenter`/`VectorPlus`/`SwiftColor`/`SwiftSVG`.
- Drop orphan `//submodules/Postbox` BUILD deps across 3 cleanup rounds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 14:11:06 +02:00
isaac
69bfc65da7
Postbox refactor waves 138–276: 168-commit squash
...
Consolidates 137 wave commits + 31 supporting commits (CLAUDE.md bump,
typealias additions, AnyObject→EngineMedia restoration) into one squashed
commit. Migrates dozens of consumer-side public APIs, struct fields,
protocol methods, and enum payloads from Postbox protocols/structs to
TelegramEngine engine wrappers and typealiases. Drops `import Postbox`
from many files. Adds new TelegramCore typealiases and one
TelegramEngineUnauthorized facade.
Notable changes by category:
**TelegramCore typealias additions** (rule 2 — narrow utility typealiases):
- EngineChatListIndex, EngineTempBoxFile, EngineItemCollectionItemIndex,
EngineItemCollectionViewEntryIndex, EngineValueBoxEncryptionParameters,
EngineMessageAndThreadId, EnginePeerStoryStats, EngineMessageHistoryAnchorIndex,
EngineChatListTotalUnreadStateCategory, EngineChatListTotalUnreadStateStats,
EnginePeerSummaryCounterTags, EngineChatListTotalUnreadState,
EngineItemCacheEntryId, EngineHashFunctions,
EngineCachedMediaResourceRepresentationResult,
EngineMediaResourceDataFetchResult, EngineMediaResourceDataFetchError,
EngineMediaResourceStatus, EngineCachedPeerData
**TelegramCore engine extensions/forwarders**:
- EngineMessage.engineMedia, EngineMessage.enginePeers,
EngineMessage.adAttribute, EngineMessage.effectivelyIncoming
- engineFileSize forwarder
- TelegramEngine.Resources.clearCachedMediaResources(mediaResourceIds: Set<EngineMediaResource.Id>)
- TelegramEngine.Resources.fetchStatus(id:resourceSize:)
- TelegramEngineUnauthorized.UnauthorizedResources facade with storeResourceData
**Public API/struct migrations to engine types**:
- ChatAvailableMessageActions.banAuthor/banAuthors → EnginePeer?/[EnginePeer]
- WebSessionsContextState.peers → [EnginePeer.Id: EnginePeer]
- CacheUsageStats.peers → [EnginePeer.Id: EnginePeer]
- PeerCommand.peer → EnginePeer
- PeerInfoControllerMode.calls(messages:) → [EngineMessage]
- CallControllerNodeProtocol.updatePeer → EnginePeer params
- ChatHistoryListNode.messageInCurrentHistoryView (and 4 variants) → EngineMessage?
- ChatHistorySearchContainerNode.messageForGallery → EngineMessage?
- PeerInfoPaneNode.findLoadedMessage / ensureMessageIsVisible /
transitionNodeForGallery → engine-typed
- GalleryHiddenMediaTarget.getTransitionInfo /
GalleryHiddenMediaManager.findTarget → engine-typed
- ChatPanelInterfaceInteraction.presentReactionDeletionOptions /
presentBan*MessageOptions → EnginePeer
- DrawingMessageRenderer.messages → [EngineMessage]
- ChatVideoGalleryItemScrubberView.setFetchStatusSignal →
EngineMediaResource.FetchStatus
- ChannelDiscussionGroupActionSheetItem.peer, VoiceChatPeerEntry.peer,
VoiceChatFullscreenParticipantItem.peer, MediaStreamComponent.chatPeer,
MediaStreamVideoComponent.callPeer, ChatMessageContactBubbleContentNode.contactPeer,
ChatMessageForwardInfoNode.peer, ChatMessageCommentFooterContentNode.replyPeers,
ChatReportPeerTitlePanelNode.peer, ChatMessageActionUrlAuthController.bot,
PeerMediaCollectionInterfaceState.peer, ChatMessageCallBubbleContentNode.peopleAvatars,
ChatLoadingNode.renderedPeer (→ EngineRenderedPeer) — all to engine types
**Wave-71-shadow stored-field migrations** (Postbox Peer/Message → Engine wrapper):
- LegacyCallControllerNode.peer
- CallStatusBarNode.currentPeer
**Dead-code / dead-field removals**:
- CallController.peer, CallControllerNodeV2.account,
ContactMultiselectionController PeerNameIndex fields,
preparedChatListNodeViewTransition account: Account param,
FetchResource.swift entirely (unused function)
**Module-level Postbox import drops**: 30+ files including TelegramRootController,
EditStories, GiftViewScreen, AnimatedStickerUtils, FetchPhotoLibraryImageResource,
PeerInfoGiftsPaneNode, PeerInfoPaneContainerNode, PresentAddMembers,
PeerInfoProfileItems, ChatControllerAdminBanUsers, PresentationData typealiases,
DefaultDayPresentationTheme, ChatListViewTransition, GalleryHiddenMediaManager,
RecentSessionsController, GifContext, AuthorizationSequenceController,
PeerInfoHeaderEditingContentNode, PeerInfoHeaderNode,
PeerAllowedReactionListController, CallControllerNodeV2, and 6 PeerInfo pane files.
**AnyObject restoration**: rule 8 added (never substitute Postbox protocols
with Any/AnyObject) — undid previous AnyObject substitutions in waves 141/143
back to EngineMedia.
Doc maintenance: CLAUDE.md updated to reflect new typealiases and forwarders.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:44:27 +02:00
isaac
d02019f985
Rich bubble: instant-page link handling
...
Adds ChatControllerInteraction dependency, link-progress state, URL tap
detection, press-highlight separation from in-flight URL shimmer, media-tap
routing through openMessage with explicit IV media subject, and gallery↔bubble
transition with hidden-media coordination. Stops re-appending to
currentLayoutItemsWithNodes across re-layouts. Drops a leftover MetalEngine
debug print as well.
2026-05-02 00:36:33 +02:00
Ilya Laktyushin
d0d3b064ed
Cherry-pick fixes
2026-04-01 00:59:30 +02:00
Ilya Laktyushin
ceceec2e94
Various fixes
2026-03-28 23:42:30 +01:00
Ilya Laktyushin
25762d1133
Various fixes
2026-03-24 17:21:46 +01:00
Ilya Laktyushin
67f45ba06d
Various improvements
2026-03-24 06:54:30 +01:00
Ilya Laktyushin
a171e30532
[WIP] Polls
2026-03-14 00:07:57 +01:00
Isaac
1fb93ab298
Various improvements
2025-02-25 14:46:07 +00:00
Isaac
9a038722d3
Various improvements
2024-11-20 22:09:16 +04:00
Ilya Laktyushin
2bf11a6279
Various improvements
2024-08-09 17:43:47 +02: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
8446fd3ab1
Business fixes
2024-02-28 19:22:43 +04:00
Isaac
bd4a534097
Various improvements
2024-02-02 14:32:13 +01:00
Isaac
d4f7440703
Saved message improvements
2024-01-29 21:23:19 +01:00
Ali
04b05b510a
Stories
2023-06-26 01:58:08 +03:00
Ali
ed389b83ec
[WIP] Stories
2023-05-02 23:45:50 +04:00
Ali
6a548e11a6
Refactoring [skip ci]
2023-04-19 23:47:38 +04:00
Ali
7d6b9c95e7
[WIP] Stories UI
2023-04-18 18:33:35 +04:00
Ilya Laktyushin
e7fb73cadd
Channel translation
2023-01-18 01:13:56 +04:00
Ilya Laktyushin
d6436fd14c
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
2022-12-17 16:09:34 +04:00
Ilya Laktyushin
77df1cf45a
Various improvements
2022-12-17 15:35:00 +04:00
Ali
614c74b0b0
[WIP] Modern cache
2022-12-17 00:17:31 +04:00
Ilya Laktyushin
47ffcd2e4d
Update API [skip ci]
2022-12-13 17:42:32 +04:00
Ilya Laktyushin
21121e1924
Avatar setup improvements
2022-12-12 04:46:21 +04:00
Ali
2cb2717ce7
Support colored emoji
2022-12-10 00:22:38 +04:00
Ali
b35ede7462
Fix gallery source in channel replies
2022-11-11 01:47:13 +04:00
Ilya Laktyushin
ac9299df0b
Extended media implementation
2022-08-31 17:57:24 +02:00
Ilya Laktyushin
519370cb3c
Various improvements
2022-08-02 19:15:08 +03:00
Ali
a183d69534
Refactoring
2022-05-29 02:09:25 +04:00
Ali
54788f60de
Local audio transcription experiment and UI fixes
2022-05-17 23:21:11 +04:00
Ali
a9c595a640
Another feed experiment
2022-03-18 22:55:06 +04:00
Ilya Laktyushin
d811f5f160
Attachment menu improvements
2022-02-21 10:11:53 +03:00
Ali
d566ed951c
Fix local message gallery
2021-11-12 20:38:47 +04:00
Ali
b778c66226
Refactoring
2021-09-20 23:07:38 +03:00
Ali
c87725579d
Revert "Temporarily disable -warnings-as-errors, investigate whole-module build"
...
This reverts commit 80380d26aa .
2021-08-04 20:45:08 +02:00
Ali
80380d26aa
Temporarily disable -warnings-as-errors, investigate whole-module build
2021-08-04 01:40:18 +02:00
Ali
2d66131682
Refactoring
2021-08-04 01:30:57 +02:00
Ali
1a04fb4408
Refactor SyncCore back into TelegramCore
2021-07-21 21:43:20 +02:00
Ali
7161c34527
Modernize video playback UI
2021-07-20 21:17:14 +02:00
Ali
2805b1715c
Cleanup
2020-12-17 16:36:55 +04:00
Ilya Laktyushin
a6a9a2f7af
Search filters fixes
2020-09-29 01:33:08 +04:00
Ilya Laktyushin
9ef16b1185
Search results gallery fixes
2020-09-07 19:42:41 +03:00
Ilya Laktyushin
3fd6ee004b
Search filters improvements
2020-09-07 15:22:35 +03:00