Commit graph

147 commits

Author SHA1 Message Date
isaac
e918b353ec Postbox refactor waves 278-356: squash
Squashes 79 sequential refactor waves into a single commit.

Highlights:
- Drop `import Postbox` (and matching `//submodules/Postbox` BUILD deps) from a wide swath of consumer files: ChatList, ChatMessage*BubbleContentNode subclasses, ListMessageNode/ListMessageItem, GalleryData, ChatHistorySearchContainerNode, ChatPanelInterfaceInteraction, ChatControllerInteraction, ChatMessageStickerItemNode, ChatMessageReplyInfoNode, ChatMessageInstantVideoItemNode, ChatPresentationInterfaceState, BrowserMarkdown/Readability, MediaResources, LocalMediaResources, ICloudResources, FetchManager, ShareController, OpenChatMessage, GalleryController, GroupStickerSearchContainerNode, GroupStickerPackCurrentItem, ChatPinnedMessageTitlePanelNode, OverlayAudioPlayerController, PresentationThemeSettings, StatisticsUI/StoryIconNode, TextFormat/StringWithAppliedEntities, GalleryUI/VideoAdComponent, StickerPackPreviewUI, WallpaperPreviewMedia, WallpaperResources, YoutubeEmbedImplementation, InstantPageExternalMediaResource, PlatformRestrictionMatching, TelegramUIDeclareEncodables, ChatListNode/ChatListSearchContainerNode.
- Add `TelegramEngine` facades: `Themes.wallpapers`, `Themes.themes`, `AccountData.addAppLogEvent`.
- Add `EngineMessageHistoryEntryLocation` wrapper.
- Add `EngineRaw*` escape-hatch typealiases (`EngineRawMessage`, `EngineRawPeer`, `EngineRawMedia`, `EngineRawMediaResource`, `EngineRawMediaResourceData`, `EngineRawItemCollectionItem`, `EngineRawItemCollectionInfo`) and `engineDeclareEncodable` forwarder.
- Drop unused `account:`/`postbox:`/`network:` parameters from several public functions and delete the dead overloads/types/functions left over: `automaticThemeShouldSwitchNow`, `cancelFreeMediaFileInteractiveFetch`, `legacyEnqueueVideoMessage`, `TelegramMediaFileReference`, plus assorted dead public TelegramCore/AccountContext SecureId entry points.
- Delete entire dead modules: `LegacyDataImport`, `TonBinding`, `SpotlightSupport`, `SvgRendering`, third-party `AppCenter`/`VectorPlus`/`SwiftColor`/`SwiftSVG`.
- Drop orphan `//submodules/Postbox` BUILD deps across 3 cleanup rounds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 14:11:06 +02:00
isaac
ea0f6a685c Postbox refactor wave 277: cachedWallpaper(account:) → cachedWallpaper(engine:network:)
Migrate `cachedWallpaper(account: Account, ...)` in WallpaperCache.swift to
take `(engine: TelegramEngine, network: Network, ...)` instead of the umbrella
Account parameter. Body drops the local `let engine = TelegramEngine(account:)`
since engine is now a parameter; `account.network` is now `network`.

19 context-based callers (`account: context.account` /
`self.context.account` / `component.context.account`) update via perl
sweep to pass `engine: context.engine, network: context.account.network`.

3 internal-Account-typed callers (WallpaperResources.swift × 2,
ThemeUpdateManager.swift × 1) bridge with adhoc
`engine: TelegramEngine(account: account), network: account.network`
since they're inside functions that still take `account: Account` and have
heavier Postbox uses we can't migrate yet.

Drops `import Postbox` from WallpaperCache.swift since the only remaining
Postbox-ish identifier was `ValueBoxKey`, which swaps to `EngineDataBuffer`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:54:26 +02:00
isaac
7ccb382f53 Postbox -> TelegramEngine waves 103-105 (squashed)
Wave 103 (original): ChatRecentActionsControllerNode.peer Peer ->
EnginePeer migration ABANDONED after pre-flight discovered a 75-site
ADD-bridge cascade through chatRecentActionsHistoryPreparedTransition
into Message.peers SimpleDictionary<PeerId, Peer> store sites.
Lessons captured in docs/superpowers/postbox-refactor-log.md "Wave 103
ABANDONED" section + ~/.claude/projects/-Users-isaac-build-telegram
-telegram-ios/memory/feedback_wave71_shadow_risk.md (4-layer pre-flight
checklist for stored-Peer-field migrations).

Wave 103 (retry, 92230b0691): drained 5 accountManager.mediaBox
.storeResourceData Shape-A sites against the wave-94 facade. 2 files /
3 Edit calls (1 single + 2 replace_all) / 1-iter / 29.5s build. Closes
the storeResourceData accountManager-side drain entirely.

Wave 104 (08fc3f721e): drained 3 of 8 accountManager.mediaBox.resourceData
Shape-A sites against the wave-32/wave-94 AccountManagerResources.data
(resource:) facade + 3 consumer-side .complete -> .isComplete renames
(EngineMediaResource.ResourceData field rename). 1 file / 6 Edit calls
/ 1-iter / 11.7s build. 5 of 8 candidates deferred behind Postbox-typed
-function-parameter barriers (fetchCachedScaled*Representation cascade,
combineLatest typed-tuple coupling). Established the "Postbox-typed
-function-parameter barrier registry" pattern.

Wave 105 (0c76724409): DeviceContactInfoSubject enum 3 case Peer?
payloads + 2 callback signatures + 1 computed property migrate to
EnginePeer?. 5 files / 17 edits / 1-iter / 203s build (foundational
AccountContext touch). Net wrap delta -8 (10 drops, 2 ADD bridges, 1
downcast->case-let). First wave-71-shadow-style migration after the
wave-103 abandonment forced a discipline reset; first-pass-clean via
thorough pre-flight inventory (~15 min).

Net session progress: -16 wraps across 4 wave attempts plus durable
scaffolding (feedback memory, barrier registry, 4-layer pre-flight
checklist).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 16:57:55 +04:00
isaac
e51fef57d8 Add swift svg 2026-04-24 23:19:15 +04:00
Ilya Laktyushin
a7924e7b6f Various improvements 2025-08-28 02:14:32 +04:00
Ilya Laktyushin
03fce1ed09 Various improvements 2025-08-26 20:08:50 +04:00
Ilya Laktyushin
4e1b9943a4 Various improvements 2025-08-26 15:44:41 +04:00
Isaac
6ff5012e18 Rating 2025-07-28 00:29:25 +02:00
Ilya Laktyushin
3fe6f7a069 Various improvements 2024-10-19 20:24:02 +04:00
Ilya Laktyushin
3ca419048c Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2023-12-19 20:56:31 +04:00
Isaac
09e025e985 [WIP] Channel appearance 2023-12-15 22:59:33 +04:00
Ilya Laktyushin
719f7afed4 Chat wallpaper fixes 2023-04-13 04:13:33 +04:00
Ilya Laktyushin
62470a424f Chat wallpaper improvements 2023-04-11 22:25:41 +04:00
Ilya Laktyushin
15ecbd1136 Chat wallpaper fixes 2023-04-10 17:00:35 +04:00
Ilya Laktyushin
32de4a1bc7 Chat wallpaper improvements 2023-04-09 16:03:17 +04:00
Ilya Laktyushin
eb9d6f576a Chat wallpaper improvements 2023-04-06 01:30:36 +04:00
Ilya Laktyushin
05a3fa5bad Chat wallpaper improvements 2023-04-05 16:07:16 +04:00
Ilya Laktyushin
fb0598b2e0 Fix wallpaper pattern size 2023-03-03 17:36:41 +04:00
Ilya Laktyushin
2adf8a010d Tune wallpaper pattern scale on iPad 2023-03-03 12:11:34 +04:00
Ilya Laktyushin
8733c482c7 Wallpaper pattern tiling in landscape 2023-02-28 22:26:01 +04:00
Ali
614c74b0b0 [WIP] Modern cache 2022-12-17 00:17:31 +04:00
Ilya Laktyushin
1103706315 Update API 2022-12-05 17:05:40 +04:00
Ali
f07c30bd5b Make DrawingContext initializer failable 2022-11-15 13:40:31 +04:00
Ali
a92f3fe738 Fix build 2022-11-01 18:07:52 +04:00
Ilya Laktyushin
4955f9301e Dark theme improvements 2022-10-23 21:24:09 +03:00
Ilya Laktyushin
e3d4c2e881 Various fixes 2022-10-22 20:28:14 +03:00
Ali
c146d15559 Refactoring 2022-05-29 04:27:40 +04:00
Ali
a183d69534 Refactoring 2022-05-29 02:09:25 +04:00
Ilya Laktyushin
7f7cb498bb Web app improvements 2022-04-07 22:30:48 +04:00
Ilya Laktyushin
6c93d3bd5d Trigger rebuild 2022-03-06 01:42:22 +04:00
Ilya Laktyushin
65918f2909 Various Improvements 2022-01-18 20:52:09 +03:00
Ilya Laktyushin
15caa32878 Various Improvements 2022-01-09 09:40:39 +03:00
Ilya Laktyushin
835ce9adae Various Improvements 2021-12-18 02:35:50 +04:00
Ali
cdc04c733c Wallpaper experiment 2021-11-05 20:35:30 +04:00
Ilya Laktyushin
66b7729e13 Various Fixes 2021-10-28 23:32:09 +04:00
Ilya Laktyushin
5b3de872f5 Various Fixes 2021-10-28 02:49:32 +04:00
Ilya Laktyushin
a9289f03e4 Various Fixes 2021-10-28 01:17:28 +04:00
Ilya Laktyushin
d86b655413 Various fixes 2021-10-28 00:23:37 +04:00
Ilya Laktyushin
461f9b874c Various settings UI improvements 2021-10-25 19:16:03 +04:00
Ilya Laktyushin
d60588b3f1 Various Improvements 2021-10-22 18:59:41 +04:00
Ilya Laktyushin
7508fc7290 Various Improvements 2021-10-18 17:50:15 +04:00
Ali
f23d5ef97a Refactoring 2021-09-20 01:12:06 +03:00
Ali
ce36439bd2 Refactoring 2021-09-19 13:55:17 +03:00
Ilya Laktyushin
e5f15bf084 Various theme improvements 2021-09-07 11:44:46 +03:00
Ilya Laktyushin
60c51d8008 Various Improvements 2021-09-03 15:50:25 +03:00
Ilya Laktyushin
74092d28e9 Optimize pattern wallpapers rendering 2021-09-02 04:26:06 +03:00
Ilya Laktyushin
22b5379d9c Various Fixes 2021-08-27 16:57:35 +03:00
Ilya Laktyushin
0bf77e71a7 Fix pattern wallpaper rendering 2021-08-25 09:55:21 +03:00
Ilya Laktyushin
d423f90681 Implemented chat-specific themes 2021-08-22 18:30:49 +03:00
Ali
bf253eec46 Refactoring 2021-08-12 16:41:11 +02:00