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
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
e8baaa5a22
Poll improvements
2026-04-30 15:36:13 +02:00
isaacand isaac
7ef7f16727
Improve animations
2026-04-30 12:56:55 +04:00
Ilya Laktyushin
5d7edcf36f
Various fixes
2026-04-29 04:35:17 +02:00
Ilya Laktyushin
ea090a6858
Various improvements
2026-04-28 23:53:26 +02:00
Ilya Laktyushin
c4e1049396
Various fixes
2026-04-27 01:36:16 +02:00
d1aa0db537
Postbox -> TelegramEngine waves 46-93 (squashed)
...
Squash of 63 commits spanning waves 46-93 (plus interspersed docs commits)
of the gradual Postbox->TelegramEngine consumer-side migration.
Scope: 139 files changed, 2123 insertions(+), 452 deletions(-).
## Themes by wave-block
**Waves 46-58 — Peer field migrations + facade additions**
Foundational EnginePeer convenience init additions (PeerReference, RenderedPeer,
SelectivePrivacyPeer). Multiple `peer: Peer` field migrations across PeerInfo,
ChatList, and SettingsUI components.
**Waves 59-73 — peer field cascade + EnginePeer wrap drops**
Series of single- to two-file peer-field migrations; consumer-side wrap
removal (`EnginePeer(peer)` -> direct EnginePeer use); `as? TelegramUser`
cast conversion to `case let .user(...)` enum match. Wave 64: RenderedPeer
convenience init. Wave 68: SelectivePrivacyPeer convenience init.
**Waves 74-83 — controller-Node bridge cleanup + small migrations**
Wave-71 shadow-pattern cleanup at controller->Node bridges. Migrations of
ChatRecentActionsController.peer (74), PeerInfoMember (75), MentionChatInputPanelItem
(76), PassportUI SecureIdAuthController (77), AccountWithInfo + ShareController
(78), peerInputActivitiesPromise (79), InactiveChannel (80), BlockedPeers (81),
openHashtag resolveSignal (82), NotificationExceptionsList (83).
**Waves 84-90 — TelegramEngine.Resources facade migrations**
Per-method Shape-A/B sweeps converting `<ctx>.account.postbox.mediaBox.X(...)`
to `<ctx>.engine.resources.X(...)`. Wave 90 was a single-commit big sweep:
40 fetchedMediaResource sites in 25 files migrated to engine.resources.fetch
facade in one atomic pass with first-pass-clean build.
Methods covered: storeResourceData, completedResourcePath, cancelInteractiveResourceFetch,
resourceRangesStatus, resourceStatus, fetch (fetchedMediaResource).
**Waves 91-92 — additional type migrations**
Wave 91: ItemListWebsiteItem.peer + RecentSessionsController enum-case payload
+ openWebSession callback Peer? -> EnginePeer?.
Wave 92: ChatListController StateHolder.EntryContext status type
MediaResourceStatus -> EngineMediaResource.FetchStatus.
**Wave 93 — speculative `import Postbox` drop sweep**
Drop import from 7 wave-touched files where it became unused; restore in 5
files where bare PeerId/Message/MediaId/StoryId references escaped the
pre-flight regex. Includes one MediaId(...) -> EngineMedia.Id(...) swap in
InAppPurchaseManager to unlock its import drop.
## Build state
Final state at squash: clean Telegram/Telegram build at debug_sim_arm64.
## Persistent-state notes
- Pre-existing WIP unchanged across the squashed range:
- build-system/bazel-rules/sourcekit-bazel-bsp submodule marker
- Untracked: build-system/tulsi/, submodules/TgVoip/, third-party/libx264/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-25 20:48:15 +04:00
Ilya Laktyushin
dbd40fe7d3
Various improvements
2026-04-22 23:03:51 +02:00
a0ba3fa29c
Postbox -> TelegramEngine wave 24: moveResourceData facades + consumer sweep
...
Adds two TelegramEngine.Resources.moveResourceData overloads and migrates 6 Shape-A sites
across 4 consumer files.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-21 04:04:08 +04:00
Ilya Laktyushin
31e3a7dc79
Fix build
2026-04-16 02:36:03 +02:00
Ilya Laktyushin
0df319742a
Update API
2026-04-16 01:18:22 +02:00
Ilya Laktyushin
c81015c003
Various fixes
2026-04-02 19:20:15 +02:00
Ilya Laktyushin
629f2b1e5d
Various fixes
2026-04-01 00:33:44 +02:00
Ilya Laktyushin
e7722d7b29
Various fixes
2026-04-01 00:10:39 +02:00
Ilya Laktyushin
ff95bd97c9
Various fixes
2026-03-31 23:06:05 +02:00
Ilya Laktyushin
ceceec2e94
Various fixes
2026-03-28 23:42:30 +01:00
Ilya Laktyushin
6df559ff97
Various fixes
2026-03-28 20:47:35 +01:00
Ilya Laktyushin
e0ec4d9c31
Various fixes
2026-03-27 18:45:53 +01:00
Ilya Laktyushin
bc3612587b
Various fixes
2026-03-27 11:13:25 +01:00
Ilya Laktyushin
ed55943a44
Various improvements
2026-03-27 01:13:38 +01:00
Ilya Laktyushin
77cc01f0d9
Various fixes
2026-03-26 13:58:50 +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
e11c9899e6
Various fixes
2026-03-23 15:03:50 +01:00
Ilya Laktyushin
87409ead6c
Various fixes
2026-03-23 12:41:42 +01:00
Ilya Laktyushin
d0e26af8b1
Various fixes
2026-03-22 18:05:56 +01:00
Ilya Laktyushin
66d08c0e1b
Various improvements
2026-03-22 13:44:04 +01:00
Ilya Laktyushin
f12fb93a3e
[WIP] Polls
2026-03-20 14:52:19 +01:00
Ilya Laktyushin
e7a334364c
[WIP] Polls
2026-03-20 12:15:27 +01:00
Ilya Laktyushin
433237d1e9
[WIP] Polls
2026-03-20 10:15:00 +01:00
Ilya Laktyushin
c32f645f5e
[WIP] Polls
2026-03-17 16:32:49 +01:00
Ilya Laktyushin
6519b5c84d
[WIP] Polls
2026-03-17 11:12:58 +01:00
Ilya Laktyushin
b1a190f87a
[WIP] Polls
2026-03-16 18:07:12 +01:00
Ilya Laktyushin
a171e30532
[WIP] Polls
2026-03-14 00:07:57 +01:00
Ilya Laktyushin
950d99eea7
[WIP] Polls
2026-03-13 14:11:19 +01:00
Ilya Laktyushin
cbc5a49507
[WIP] Polls
2026-03-13 11:04:33 +01:00
Ilya Laktyushin
94923cc353
Reapply "Update API"
...
This reverts commit 0411cfc18c .
2026-03-11 18:51:44 +01:00
Ilya Laktyushin
0411cfc18c
Revert "Update API"
...
This reverts commit 6c1376169c .
2026-03-11 18:04:50 +01:00
Ilya Laktyushin
6c1376169c
Update API
2026-03-11 14:37:23 +01:00
Ilya Laktyushin
179be956d0
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
2026-01-05 15:23:22 +04:00
Ilya Laktyushin
c654227b83
Various fixes
2026-01-05 15:14:19 +04:00
Isaacand Isaac
b625243040
Various improvements
2025-07-29 15:48:11 +02:00
Ilya Laktyushin
41ae916106
Various improvements
2025-06-08 18:28:49 +02:00
Ilya Laktyushin
80cd8f7b32
Various improvements
2025-03-11 06:49:43 +04:00
Isaacand Isaac
8af8de7096
Reaction experiments
2024-06-28 19:36:15 +02:00
Isaacand Isaac
e4af93bf56
Merge commit 'e236672d01030256872550fba651b508a92532a1'
2024-05-03 22:56:53 +04:00
Isaacand Isaac
16faaa4575
[WIP] Send message effects
2024-05-03 22:56:50 +04:00
Ilya Laktyushin
63e45b4bbb
Add support for poll translation
2024-05-03 13:43:42 +04:00
Isaacand Isaac
ba55877c44
Poll emoji improvements
2024-04-22 19:21:35 +04:00