Commit graph

62 commits

Author SHA1 Message Date
Ilya Laktyushin
f41630083a Various improvements 2026-04-24 03:16:14 +02:00
Isaac
f84e94f507 MediaResource → EngineMediaResource refactor: wave 2
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>
2026-04-17 09:07:54 +02:00
Isaac
d575824ab4 Various improvements 2026-04-10 14:30:23 +02:00
Isaac
34477605b1 Various improvements 2026-03-31 20:24:24 +08:00
Isaac
87187bd414 Fixes 2026-01-02 23:11:51 +08:00
Ilya Laktyushin
2bba31bcdf Alerts 2025-12-22 23:28:04 +04:00
Isaac
42f10b4fed Merge branch 'master' into glass-26 2025-12-02 17:30:38 +08:00
Isaac
8f1c9019be Passkeys 2025-12-02 01:43:04 +08:00
Isaac
0055396d4d Update 2025-11-26 23:05:30 +08:00
Isaac
95ecb88025 Passkeys 2025-11-19 00:07:50 +08:00
Ilya Laktyushin
0915a42e64 Various improvements 2025-10-16 05:30:06 +04:00
Ilya Laktyushin
ea2c1e24af Various fixes 2025-08-25 03:43:22 +04:00
Ilya Laktyushin
e7c698d5f1 Various fixes 2025-08-23 21:40:21 +04:00
Ilya Laktyushin
2c07764a31 Fix purchase manager 2025-08-21 20:27:34 +04:00
Isaac
a23deded22 Cleanup 2025-06-28 19:48:34 +02:00
Ilya Laktyushin
c5223959b2 Various improvements 2025-06-19 01:26:50 +02:00
Ilya Laktyushin
80cd8f7b32 Various improvements 2025-03-11 06:49:43 +04:00
Ilya Laktyushin
2ecbaf4507 Various improvements 2025-03-10 15:32:15 +04:00
Ilya Laktyushin
cdd987e627 Various fixes 2025-03-07 21:56:17 +04:00
Isaac
4dfb7f9d17 Change email 2024-07-18 11:41:43 +08:00
Ilya Laktyushin
1ae20bd685 Various improvements 2024-06-15 18:41:19 +04:00
Ilya Laktyushin
f199fe9641 Authorization improvements 2024-04-22 22:17:35 +04:00
Ilya Laktyushin
1f8e9b568a Authorization improvements 2024-04-22 22:10:15 +04:00
Ilya Laktyushin
7b0b47e894 Various improvements 2024-04-22 18:47:25 +04:00
Ilya Laktyushin
acf905a098 Various improvements 2024-04-20 19:37:16 +04:00
Ilya Laktyushin
8876026edb Add option to disable future login tokens 2024-04-17 21:19:06 +04:00
Ilya Laktyushin
a736b22baa Authorization improvements 2024-04-16 17:21:40 +04:00
Ilya Laktyushin
231d8f0808 Update API 2024-04-15 16:39:53 +04:00
Ilya Laktyushin
f557e0e606 Display apple sign in error message 2024-03-16 15:45:15 +04:00
Ilya Laktyushin
5d967279b9 Stop using CTCarrier for country code detection due to it's deprecation 2024-02-19 19:17:51 -04:00
Ilya Laktyushin
32bde3d24b Update API 2024-01-30 03:25:44 +04:00
Ilya Laktyushin
3b538509e8 Add sign up announcement setting 2024-01-25 17:10:04 +04:00
Isaac
e6bf1d857a Fix alert formatting 2024-01-21 21:43:38 +01:00
Ali
bc576aab86 Fix push in change number flow 2023-11-14 16:41:10 +04:00
Ali
d892e030e0 Debugging 2023-09-25 19:47:44 +04:00
Ali
b7fbcbf118 Upgrade to iOS 12 2023-09-23 12:38:29 +04:00
Ali
4330dc14d2 [WIP] Disposable debugging 2023-09-16 11:45:30 +02:00
Ali
77a5857a25 Sharing refactoring 2023-08-15 23:57:04 +04:00
Ali
1037b25bc5 Add app outdated error 2023-04-25 21:25:48 +04:00
Ilya Laktyushin
5c906c198d Various fixes 2023-03-14 23:25:44 +04:00
Ilya Laktyushin
b4f359a8e7 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2023-03-13 13:21:55 +04:00
Ilya Laktyushin
a2ca4ddc3e Login email reset improvements 2023-03-13 12:44:08 +04:00
Ali
8380e87571 Merge commit '35f21a6cb6' 2023-03-10 22:29:23 +04:00
Ali
a9dcac6621 Add more info to code report email 2023-03-10 22:28:35 +04:00
Ilya Laktyushin
6adfeffa28 Login email reset improvements 2023-03-10 18:31:50 +04:00
Ilya Laktyushin
3e99385716 Add login email reset 2023-03-09 20:29:28 +04:00
Ilya Laktyushin
685b0a765c Fix build 2023-03-08 13:57:22 +04:00
Ilya Laktyushin
8188bc2858 Various fixes 2023-02-23 14:29:22 +04:00
Ilya Laktyushin
bf94ea75e9 Various fixes 2023-02-06 00:55:17 +04:00
Ali
6d8c7243e5 Permission and search UI improvements 2023-01-17 23:02:57 +04:00