32 Commits
Author SHA1 Message Date
Ilya Laktyushin 622f9d970a Various fixes 2026-05-31 17:35:32 +02:00
Ilya Laktyushin 7a7333edab Various improvements 2026-05-05 14:57:06 +02:00
isaacandClaude 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
isaacandClaude Opus 4.7 b20cd3502b Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep
Wave 11: ActionSheetPeerItem de-Postboxed. Revisits wave-1 abandonment.
`postbox: Postbox, network: Network` init params collapse to
`stateManager: AccountStateManager`; avatar setPeer call routes via
`item.stateManager.postbox` / `.network`. Module never names Postbox.
Sole caller (ShareController.swift:1146) migrated in place.

Wave 12: HorizontalPeerItem de-Postboxed (same pattern). Ripples the
collapse up into ChatListSearchRecentPeersNode's public init
(`postbox:/network:` -> `stateManager:`). That module still imports
Postbox for PostboxViewKey/UnreadMessageCountsView internals but its
public surface simplifies. 3 external caller sites migrated.

Wave 13: AttachmentTextInputPanelNode minor cleanup. Module was already
Postbox-free at source level (wave 6) but carried a dead BUILD dep and
had 2 raw `peerId?.namespace == Namespaces.Peer.SecretChat` checks.
Both now use existing `PeerId.isSecretChat` extension in TelegramCore.

Wave 14: BUILD-dep sweep mirroring wave 6's source sweep. 98 modules
had `//submodules/Postbox:Postbox` (or `//submodules/Postbox`) BUILD
deps despite no source file importing Postbox since wave 6. Single
iteration, zero restores -- Bazel Swift requires source-level `import`
for symbol resolution, so redundant BUILD deps are pure metadata.

Net: 110 files, +116/-149. Build verified green (debug_sim_arm64).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 20:26:58 +02:00
Ilya Laktyushin bbad57434f Various fixes 2026-02-02 15:54:43 +04:00
Isaac 2db08cde89 Glass 2026-01-13 19:21:49 +04:00
Ilya Laktyushin f59abe1689 Various improvements 2025-06-10 22:11:07 +02:00
Ilya Laktyushin a8b02015ce Various improvements 2025-03-24 05:27:50 +04:00
Ilya Laktyushin d6eecb7844 Various improvements 2025-03-18 20:12:41 +04:00
Ilya Laktyushin 2454a7a876 Various improvements 2025-03-18 14:39:58 +04:00
Ilya Laktyushin 2ecbaf4507 Various improvements 2025-03-10 15:32:15 +04:00
Ilya Laktyushin 8d7f9bf372 Various improvements 2025-02-22 19:17:36 +04:00
Ilya Laktyushin 2f2a27f0d2 Various improvements [skip ci] 2025-02-12 22:15:02 +04:00
Ilya Laktyushin ec9d5fde63 Bot ad improvements 2024-10-29 10:05:00 +04:00
Ilya Laktyushin 193699c7fd Bot ads improvements 2024-10-29 06:16:44 +04:00
Ilya Laktyushin 4b537a4cd5 Various improvements 2024-10-26 01:25:07 +04:00
Ilya Laktyushin a1b70a7070 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2024-09-25 17:05:24 +04:00
Ilya Laktyushin 1a3f7dc42d Content reporting 2024-09-24 17:26:51 +04:00
Ilya Laktyushin d0156faede Various improvements 2024-08-10 18:41:17 +02:00
Ilya Laktyushin 4216ee3933 Various improvements 2024-07-13 18:13:58 +04:00
Isaac 9a075fa39e Refactoring 2024-06-12 23:04:04 +04:00
Ilya Laktyushin 891fed3189 Add story stealth mode shortcut in chat list 2024-04-23 02:51:25 +04:00
Ilya Laktyushin a7caa2fab9 Various improvements 2024-03-28 21:46:01 +04:00
Ilya Laktyushin f81856351a Various improvements 2024-03-28 13:23:23 +04:00
Ilya Laktyushin d4e0dd8ef9 Various improvements 2024-03-27 16:09:52 +04:00
Ilya Laktyushin 9f8a699f32 Improve ads info screen 2024-03-26 18:02:43 +04:00
Ilya Laktyushin 18557ed075 Improve ad report navigation 2024-03-26 17:30:53 +04:00
Ilya Laktyushin 9bb28dcc26 Various fixes 2024-03-26 17:22:00 +04:00
Ilya Laktyushin 2253fa1550 Various improvements 2024-03-26 14:23:18 +04:00
Ilya Laktyushin 3173ac48d3 Various fixes 2024-03-26 04:11:22 +04:00
Ilya Laktyushin 9166178440 Various improvements 2024-03-24 15:14:58 +04:00
Ilya Laktyushin cb7560a34e [WIP] Birthdays 2024-03-22 12:08:27 +04:00