Commit Graph
39 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 0915a42e64 Various improvements 2025-10-16 05:30:06 +04:00
IsaacandIsaac 4f4fc92345 Bot forum updates 2025-09-05 15:43:19 +02:00
Ilya Laktyushin 1ae20bd685 Various improvements 2024-06-15 18:41:19 +04:00
AliandAli 95947fdb99 Refactoring [skip ci] 2023-04-20 18:43:29 +04:00
AliandAli 7f4d46e6c3 UI improvements 2023-03-01 18:25:56 +04:00
AliandAli a28ed6a7dc Topic-related fixes 2022-10-25 19:12:18 +04:00
AliandAli 93a7f7ece8 [WIP] Topics 2022-10-23 18:03:26 +04:00
AliandAli e8d124c812 Refactoring 2022-05-28 18:26:23 +04:00
AliandAli a9c595a640 Another feed experiment 2022-03-18 22:55:06 +04:00
Ilya Laktyushin 76f355f27a Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2021-09-25 17:22:08 +03:00
Ilya Laktyushin c849e63392 Various Fixes 2021-09-25 17:02:36 +03:00
AliandAli 6e5c503338 Refactoring 2021-09-20 14:51:46 +03:00
Ilya Laktyushin 4393227307 Various Improvements 2021-09-06 01:15:43 +03:00
Ilya Laktyushin 79ecba19b0 Chat-specific theme improvements 2021-09-04 00:39:56 +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 7bed1728bb Refactor string generation 2021-07-20 11:57:50 +02:00
AliandAli 9134bae908 Refactoring 2021-07-07 01:59:12 +04:00
AliandAli 1b48517f12 Refactoring 2021-04-26 02:00:48 +04:00
Ilya Laktyushin 2178de9f8a Various Fixes 2021-03-14 22:16:20 +04:00
Ilya Laktyushin b14e81b767 Various fixes and improvements 2021-02-23 23:01:09 +04:00
AliandAli 4336fa0d05 Group chats update 2020-11-17 20:31:25 +04:00
AliandAli 153df1fbcc [WIP] Bazel transition 2020-10-12 21:20:57 +04:00
AliandAli b1d2eda246 [WIP] 2020-10-06 17:59:46 +01:00
AliandAli 933e1f788f Comments [WIP] 2020-09-25 19:16:19 +04:00
AliandAli f3fabd8bcd Comments update 2020-09-18 21:09:24 +04:00
AliandAli 892a3a177d Comments update 2020-09-08 17:40:19 +01:00
AliandAli c7e91c9b62 Fix issues in old channels revoke UI 2019-12-16 23:07:41 +04:00
AliandAli a7aa457a92 Merge Implement content restriction API 2019-12-08 23:18:37 +04:00
AliandAli d3091f0abe Improve Dynamic Type 2019-11-26 20:44:48 +04:00
Ilya Laktyushin 1f9cbcd537 Fix action sheet Cancel button font 2019-11-22 19:59:25 +04:00
AliandAli eaa8bcb08e Support Dynamic Type 2019-11-19 23:28:36 +04:00
PeterandPeter 10692a323e Refactor SyncCore 2019-10-21 16:58:00 +04:00
PeterandPeter 284db5aba8 Use peer name localization 2019-10-11 16:05:35 +04:00
PeterandPeter 5fed1fbeb1 Temp 2019-10-07 17:03:41 +04:00
PeterandPeter 36c82642d6 Fix ItemListController crash? 2019-10-06 04:25:10 +04:00
PeterandPeter c64c16b8ee Wallet improvements 2019-09-25 00:57:46 +04:00
PeterandPeter b6316ab12c Refactor PeerInfoUI and related modules 2019-08-15 14:12:19 +03:00