mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Drive raw `MediaResource` out of the `TelegramEngine` public facade for photo-upload APIs, and complete a first batch of consumer-side migrations. Behavior-preserving. The `_internal_*` Postbox-facing functions are untouched — only the facade signatures change, bridging inside via `_asResource()` / `EngineMediaResource(_:)`. TelegramEngine facades migrated (signatures now take EngineMediaResource): - TelegramEngine.Peers.uploadedPeerPhoto / uploadedPeerVideo - TelegramEngine.Peers.updatePeerPhoto (closure param too) - TelegramEngine.AccountData.updateAccountPhoto / updateFallbackPhoto - TelegramEngine.Contacts.updateContactPhoto - TelegramEngine.Auth.uploadedPeerVideo Consumer-side changes: - MapResourceToAvatarSizes utility: signature is now (engine: TelegramEngine, resource: EngineMediaResource, ...). Uses engine.resources.data(id:) internally. The submodule drops `import Postbox` and the Bazel dep. - AuthorizationUI: avatar-video signal retyped from Signal<TelegramMediaResource?> to Signal<EngineMediaResource?>. - 27 `mapResourceToAvatarSizes(postbox:...)` call sites across 5 TelegramUI/TelegramCallsUI files migrated to the new form. Deferred: - SaveToCameraRoll (planned Task 8) abandoned — module has three public functions taking `postbox: Postbox` (umbrella-type leak, banned by rule 2) and requires a full module-migration wave, not a type swap. Reason recorded in the wave-2 plan doc. - Other TelegramEngine facades still leaking MediaResource (TelegramEngineStickers.uploadSticker; UploadSecureIdFile.* — additionally leaks Postbox) flagged for a future wave. Docs: - CLAUDE.md: new rule 7 (TelegramCore never imports UIKit/Display, shared with Telegram-Mac), and a new "MediaResource → EngineMediaResource consumer migration" section describing the wrap/unwrap helpers and the modify-in-place facade-bridging pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Components | ||
| AccountGroupCallContextImpl.swift | ||
| CallController.swift | ||
| CallControllerButton.swift | ||
| CallControllerButtonsNode.swift | ||
| CallControllerKeyButton.swift | ||
| CallControllerKeyPreviewNode.swift | ||
| CallControllerNode.swift | ||
| CallControllerNodeV2.swift | ||
| CallControllerStatusNode.swift | ||
| CallControllerToastNode.swift | ||
| CallDebugNode.swift | ||
| CallFeedbackController.swift | ||
| CallKitIntegration.swift | ||
| CallRatingController.swift | ||
| CallRouteActionSheetItem.swift | ||
| CallStatusBarNode.swift | ||
| CallSuggestTabController.swift | ||
| GroupCallLogs.swift | ||
| GroupCallScreencast.swift | ||
| GroupVideoNode.swift | ||
| LegacyCallControllerButton.swift | ||
| LegacyCallControllerButtonsNode.swift | ||
| LegacyCallControllerNode.swift | ||
| LegacyCallControllerStatusNode.swift | ||
| MetalVideoRenderingView.swift | ||
| PresentationCall.swift | ||
| PresentationCallManager.swift | ||
| PresentationCallToneData.swift | ||
| PresentationGroupCall.swift | ||
| SampleBufferVideoRenderingView.swift | ||
| ScheduleVideoChatSheetScreen.swift | ||
| SharedCallAudioContext.swift | ||
| VideoChatActionButtonComponent.swift | ||
| VideoChatEncryptionKeyComponent.swift | ||
| VideoChatExpandedControlsComponent.swift | ||
| VideoChatExpandedParticipantThumbnailsComponent.swift | ||
| VideoChatExpandedSpeakingToastComponent.swift | ||
| VideoChatListInviteComponent.swift | ||
| VideoChatMuteIconComponent.swift | ||
| VideoChatParticipantAvatarComponent.swift | ||
| VideoChatParticipantsComponent.swift | ||
| VideoChatParticipantStatusComponent.swift | ||
| VideoChatParticipantVideoComponent.swift | ||
| VideoChatParticipantVideoStatusComponent.swift | ||
| VideoChatPinStatusComponent.swift | ||
| VideoChatScheduledInfoComponent.swift | ||
| VideoChatScreen.swift | ||
| VideoChatScreenInviteMembers.swift | ||
| VideoChatScreenMoreMenu.swift | ||
| VideoChatScreenParticipantContextMenu.swift | ||
| VideoChatTitleComponent.swift | ||
| VideoChatToasts.swift | ||
| VideoChatVideoContext.swift | ||
| VideoChatVideoLoadingEffectView.swift | ||
| VideoRenderingContext.swift | ||
| VoiceChatAccountHeaderActionSheetItem.swift | ||
| VoiceChatActionItem.swift | ||
| VoiceChatCameraPreviewController.swift | ||
| VoiceChatController.swift | ||
| VoiceChatFullscreenParticipantItem.swift | ||
| VoiceChatHeaderButton.swift | ||
| VoiceChatInfoContextItem.swift | ||
| VoiceChatJoinScreen.swift | ||
| VoiceChatMainStageNode.swift | ||
| VoiceChatMicrophoneNode.swift | ||
| VoiceChatOverlayController.swift | ||
| VoiceChatParticipantItem.swift | ||
| VoiceChatPeerActionSheetItem.swift | ||
| VoiceChatPeerProfileNode.swift | ||
| VoiceChatPinNode.swift | ||
| VoiceChatRecordingContextItem.swift | ||
| VoiceChatRecordingSetupController.swift | ||
| VoiceChatShareScreenContextItem.swift | ||
| VoiceChatSpeakerNode.swift | ||
| VoiceChatTileGridNode.swift | ||
| VoiceChatTileItemNode.swift | ||
| VoiceChatTimerNode.swift | ||
| VoiceChatTitleEditController.swift | ||
| VoiceChatTitleNode.swift | ||
| VoiceChatVolumeContextItem.swift | ||