Commit graph

33 commits

Author SHA1 Message Date
isaac
46566e7155 Postbox -> TelegramEngine wave 15: SelectablePeerNode stateManager collapse
Applies the wave-11/12 AccountStateManager collapse pattern to
SelectablePeerNode. Module is now fully Postbox-free (source + BUILD).

- SelectablePeerNode.setup(... postbox: Postbox, network: Network, ...)
  -> setup(... stateManager: AccountStateManager, ...). Same for
  setupStoryRepost. AvatarNode.setPeer and EmojiStatusComponent are
  forwarded as stateManager.postbox / .network without naming Postbox.
- Three Namespaces.Peer.SecretChat == checks rewritten to use the
  existing PeerId.isSecretChat extension (as in wave 13).
- ShareControllerPeerGridItem.setup / setupStoryRepost and
  HorizontalPeerItem.setup call sites collapse to stateManager:.
  JoinLinkPreviewPeerContentNode uses the convenience
  setup(context: AccountContext) and is unchanged.
- Drop import Postbox in SelectablePeerNode.swift and the
  //submodules/Postbox:Postbox dep in SelectablePeerNode/BUILD.

The stateManager fallback (over the normally-preferred engine:
TelegramEngine) is used because SelectablePeerNode crosses the Share
Extension boundary: ShareControllerAccountContextExtension has no
Account, so TelegramEngine(account:) is physically unreachable there.
This matches the "rare but genuine fallback" clause of
feedback_postbox_refactor_handle.md.

Build verified green (debug_sim_arm64, 193 actions).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 20:37:41 +02:00
isaac
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
Isaac
4a13c3830a Glass 2025-12-26 20:29:30 +08:00
Ilya Laktyushin
914dbc46f6 Recent actions improvements 2024-04-23 12:01:28 +04:00
Isaac
eeba8a7db1 Privacy settings 2024-01-12 22:42:18 +04:00
Ali
709bcd548c Memory leak fixes 2023-09-22 15:02:40 +04:00
Ali
77a5857a25 Sharing refactoring 2023-08-15 23:57:04 +04:00
Ilya Laktyushin
a5bd955643 Various fixes 2023-02-06 15:19:48 +04:00
Ilya Laktyushin
f1ccd3cf33 iPad trackpad support improvements 2022-07-27 21:49:25 +03:00
Ilya Laktyushin
25a09c5451 Add manual account deletion 2022-06-28 22:22:21 +03:00
Ilya Laktyushin
bd142c1cf7 Fix online indicator in share screen search 2021-10-28 14:25:59 +04:00
Ali
c87725579d Revert "Temporarily disable -warnings-as-errors, investigate whole-module build"
This reverts commit 80380d26aa.
2021-08-04 20:45:08 +02:00
Ali
80380d26aa Temporarily disable -warnings-as-errors, investigate whole-module build 2021-08-04 01:40:18 +02:00
Ali
2d66131682 Refactoring 2021-08-04 01:30:57 +02:00
Ali
648a74003e Refactoring 2021-08-01 18:12:53 +02:00
Ali
1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
Ali
2805b1715c Cleanup 2020-12-17 16:36:55 +04:00
Ilya Laktyushin
e0aacc155c Voice Chat UI improvements 2020-12-04 20:30:51 +04:00
Ilya Laktyushin
6b75d36548 Voice Chat UI improvements 2020-11-30 03:38:41 +04:00
Ali
1db12483cc WIP 2020-11-27 22:12:59 +04:00
Ilya Laktyushin
cefc01f28c Search filters improvements 2020-09-25 19:11:58 +03:00
Ali
f57d6b6168 Temp 2020-02-20 18:08:36 +04:00
Ali
7cea54c937 Improve Dynamic Type in chat list 2019-12-20 11:29:32 +04:00
Ali
a7aa457a92 Merge Implement content restriction API 2019-12-08 23:18:37 +04:00
Peter
10692a323e Refactor SyncCore 2019-10-21 16:58:00 +04:00
Peter
8181fbb1a6 Remove projects 2019-10-04 13:58:00 +04:00
Peter
b826d1e1b0 Automatically select presentation on present 2019-09-16 18:25:17 +04:00
Peter
6c544eb9c2 Modal UI improvements 2019-09-16 13:21:18 +04:00
Peter
e34bf0680a Temp 2019-08-27 00:44:36 +04:00
Peter
28417b4358 Remove UnreadSearchBadge 2019-08-05 23:18:36 +03:00
Peter
e9ee7d811b Try again 2019-08-05 22:49:51 +03:00
Peter
fff7ae1a22 Fix crash? enum -> struct 2019-08-05 21:41:30 +03:00
Peter
cae277d487 Refactor ShareController and related components 2019-08-05 19:30:39 +03:00