Commit Graph
26 Commits
Author SHA1 Message Date
isaacisaacClaude Opus 4.7
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 7772e257b2 Various improvements 2024-03-20 17:21:16 +04:00
AliandAli 6513c9c6e6 Story improvements 2023-09-17 12:52:22 +02:00
AliandAli 77a5857a25 Sharing refactoring 2023-08-15 23:57:04 +04:00
AliandAli 4c72c3f75d FetchV2 improvements 2023-04-11 23:11:54 +04:00
AliandAli 0e5ef71348 Update for Xcode 14.3 2023-04-09 23:14:31 +04:00
Ilya Laktyushin 9fddaf9f96 Use static spoiler when energy saving 2023-03-03 16:48:20 +04:00
AliandAli f07c30bd5b Make DrawingContext initializer failable 2022-11-15 13:40:31 +04:00
AliandAli 61b47ada27 Emoji improvements 2022-07-22 23:30:46 +02:00
AliandAli 274f05d80a Animated emoji 2022-05-21 01:16:29 +03:00
Ilya Laktyushin 701fe95891 Various improvements 2022-04-15 03:31:37 +04:00
Ilya Laktyushin 851f106afd Various Fixes 2022-01-31 22:35:34 +03:00
Ilya Laktyushin e61f7a4de8 Fix video stickers in media editor 2022-01-27 21:29:01 +03:00
Ilya Laktyushin 1e2695839a Video Stickers Fixes 2022-01-27 17:56:25 +03:00
Ilya Laktyushin bbc082e991 Reimplement video stickers 2022-01-27 13:06:44 +03:00
Ilya Laktyushin f7a2f1952c Update rlottie 2021-11-17 13:58:14 +04:00
Ilya Laktyushin 4393227307 Various Improvements 2021-09-06 01:15:43 +03:00
Ilya Laktyushin b3ded6f7f7 Various theme editor fixes 2021-09-05 01:16:58 +03:00
AliandAli 31bc746984 Fix more warnings 2021-08-05 01:42:59 +02:00
AliandAli 1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
AliandAli 0f9648fb6c Optimize image drawing 2021-06-16 22:35:34 +04:00
Ilya Laktyushin 425a95514c Various fixes 2020-08-19 19:12:38 +03:00
AliandAli 2e60947b9e Improve sticker-related components 2019-12-27 01:32:42 +04:00
AliandAli e868873425 Implement optional cached resource data streaming 2019-12-24 20:22:38 +04:00
PeterandPeter 10692a323e Refactor SyncCore 2019-10-21 16:58:00 +04:00
PeterandPeter d2c54825f0 Refactor wallet-related modules 2019-10-08 14:30:24 +04:00