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
4107263747
Postbox refactor waves 358-426
...
Squashed range bf01b4c..a66739c (70 commits) covering 69 waves of the
Postbox -> TelegramEngine consumer migration plus a few BUILD-dep
followups.
Notable additions to TelegramCore in this range:
- Engine typealiases: EngineRawPeerPresence, EngineRawValueBoxKey,
EngineSimpleDictionary, EngineRawPeerView, EngineRawPostboxViewKey,
EngineRawPreferencesView, EngineRawMessageHistoryView (+ entry/attrs/
read-state), EngineMessageIdNamespaces, EngineHistoryViewInputAnchor,
EngineRawUnreadMessageCountsItem, EngineRawMessageHistorySavedMessages
IndexView, EngineRawChatInterfaceStateView, EngineRawOrderedItemList
View, EngineRawMessageHistoryThreadIndexView, EngineRawCombinedRead
StateView, EngineRawMessageHistoryThreadInfoView, EngineRawBasicPeer
View, EngineRawCachedPeerDataView, EngineMessageHistoryThreadData,
EngineViewUpdateType, EngineInitialMessageHistoryData,
EnginePeerGroupId, EngineChatLocationInput, EngineHistoryViewInputTag.
- Engine data items: Peer.CachedData, ItemCollections.InstalledPackInfos,
ItemCollections.InstalledPackIds.
- Engine facade: TelegramEngine.ItemCollections.allItems(namespace:).
- Free function: engineAreMediaArraysEqual forwarder.
Net effect: 65+ consumer modules drop "import Postbox"; 131 files
changed (+1386 / -1493). Build green at HEAD.
2026-05-07 07:36:30 +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
Ilya Laktyushin
21adc7d061
Various improvements
2026-03-30 02:55:35 +02:00
Ilya Laktyushin
f3c18e1436
Various improvements
2026-03-29 22:18:19 +02:00
Ilya Laktyushin
f160fb99d9
Various improvements
2026-03-29 16:23:09 +02:00
Isaac
e9f62db2c3
Fix selection
2026-03-25 01:13:19 +08:00
Ilya Laktyushin
d63f704472
Move list checkbox to the right
2026-03-24 07:13:46 +01:00
Ilya Laktyushin
8098f24f4e
Various improvements
2026-03-22 16:41:22 +01:00
Ilya Laktyushin
66d08c0e1b
Various improvements
2026-03-22 13:44:04 +01:00
Ilya Laktyushin
ea4bcd9a46
Various improvements
2026-03-21 09:47:17 +01:00
Ilya Laktyushin
2a55559f82
Various fixes
2026-03-20 15:46:56 +01:00
Ilya Laktyushin
3a311f75bd
Update API
2026-03-16 13:37:36 +01:00
Isaac
586f5039f1
Merge commit ' 974a2f6caa'
...
# Conflicts:
# submodules/TelegramUI/Components/GlobalControlPanelsContext/Sources/GlobalControlPanelsContext.swift
# submodules/TelegramUI/Components/LiquidLens/Sources/LiquidLensView.swift
# submodules/TelegramUI/Components/TranslateHeaderPanelComponent/Sources/ChatTranslationPanelNode.swift
# submodules/TelegramUI/Sources/ChatControllerNode.swift
2025-12-26 20:34:31 +08:00
Isaac
4a13c3830a
Glass
2025-12-26 20:29:30 +08:00
Ilya Laktyushin
974a2f6caa
Various improvements
2025-12-26 13:34:23 +04:00
Ilya Laktyushin
6bc1fe1939
Various improvements
2025-12-01 19:54:58 +04:00
Ilya Laktyushin
5877f2c20d
Various improvements
2025-10-29 17:20:36 +04:00
Ilya Laktyushin
35c9a5d279
Various improvements
2025-10-20 00:46:26 +04:00
Ilya Laktyushin
85092482f3
Various improvements
2025-10-17 17:01:25 +04:00
Ilya Laktyushin
0915a42e64
Various improvements
2025-10-16 05:30:06 +04:00
Ilya Laktyushin
a60a437206
Various improvements
2025-08-22 21:46:07 +04:00
Ilya Laktyushin
0bac271cdb
[WIP] Saved music
2025-08-21 09:08:35 +04:00
Ilya Laktyushin
bdaf5f5a02
Various fixes
2025-08-18 17:33:54 +04:00
Isaac
f11ebd9559
Merge commit ' f59abe1689'
2025-06-11 16:59:58 +08:00
Isaac
c7a2fe5d3e
Update to iOS 13
2025-06-11 16:59:53 +08:00
Ilya Laktyushin
f59abe1689
Various improvements
2025-06-10 22:11:07 +02:00
Isaac
f90402102b
[WIP] Monoforums
2025-05-14 00:50:46 +08:00
Isaac
140efd6cfd
[WIP] Monoforums
2025-05-10 18:02:55 +01:00
Isaac
a1de4e39b2
Fix stories in download list
2024-12-06 22:14:31 +08:00
Ilya Laktyushin
b7d572e035
Various fixes
2024-07-26 13:43:42 +02:00
Ilya Laktyushin
07c774eea7
Various fixes
2024-07-26 12:55:47 +02:00
Isaac
9a075fa39e
Refactoring
2024-06-12 23:04:04 +04:00
Ilya Laktyushin
914dbc46f6
Recent actions improvements
2024-04-23 12:01:28 +04:00
Isaac
e9f4fd3a25
- forwarded from improvements
...
- sticker categories
2024-04-22 16:43:18 +04:00
Isaac
f259829c8a
[WIP] Business
2024-02-20 14:45:25 +04:00
Isaac
0e75f18f14
[WIP] Saved messages
2023-12-25 22:58:09 +04:00
Ali
34e8c54bb0
Stories
2023-06-20 12:26:09 +03:00
Ali
6a548e11a6
Refactoring [skip ci]
2023-04-19 23:47:38 +04:00
Ali
6e3cc4a6e9
Refactoring
2023-04-17 20:21:14 +04:00
Ilya Laktyushin
688b88a37e
Improve emoji search
2023-03-29 17:19:08 +04:00
Ilya Laktyushin
d11ab57854
Various fixes
2023-03-29 17:07:35 +04:00
Ilya Laktyushin
2e9e017b57
Fix lagging when scrolling through music albums in chats
2023-03-15 14:27:29 +04:00
Ilya Laktyushin
443d0293f6
Translation fixes
2023-01-23 00:25:09 +04:00
Ilya Laktyushin
58c532b51e
Various improvements
2023-01-21 15:56:57 +04:00
Ali
41060f0da0
Modernized save to gallery
2023-01-13 21:14:45 +04:00
Ilya Laktyushin
415182b4d2
Cherry-pick various improvements
2023-01-08 01:37:02 +04:00
Ali
614c74b0b0
[WIP] Modern cache
2022-12-17 00:17:31 +04:00
Ali
037996c4cd
Fix file message layout
2022-12-02 19:45:37 +04:00