mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
ItemListPeerItem.Context.Custom's init took (postbox: Postbox, network: Network) purely to forward them to downstream AvatarNode.setPeer and EmojiStatusComponent. Collapse to engine: TelegramEngine (wave-11 pattern, engine handle preferred per the standing guidance since the sole external caller is main-app, not Share-Extension). Surface changes: - Context.Custom: two stored fields (postbox, network) -> one (engine); init param pair -> single engine:. - Context: computed postbox/network -> computed engine. - Six internal forwards route via item.context.engine.account.postbox/.network. External caller (sole .custom(Custom(...)) construction site codebase-wide): - PeerInfoSettingsItems.swift:121 -> pass engine: peerAccountContext.engine (the accountsAndPeers tuple already carries AccountContext, which exposes .engine: TelegramEngine). All 37 other ItemListPeerItem(...) sites use the .account(context: AccountContext) convenience overload unchanged. Module does NOT become Postbox-free: PeerStoryStats? (public surface on storyStats) and, via the now-unavoidable Postbox import, a handful of other transitive Postbox types remain reachable. PeerStoryStats is deeply baked into Postbox view types (PeerView, PeerStoryStatsView, ChatListEntry, MessageHistoryView, Postbox.getPeerStoryStats) and moving it would require a cross-module wrapper rewrite out of scope here. EngineMessageHistoryThread.Info (the other previously-blocking public-surface type) was moved to TelegramCore in the preceding wave 16a commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Sources | ||
| BUILD | ||