Files
Telegram-iOS/submodules
IsaacandClaude Opus 4.7 34c2c8c8a4 Postbox -> TelegramEngine wave 10: StorageFileListPanelComponent drop
Closes the last future-wave candidate from wave 8 by eliminating the
Icon.media(Media, ...) enum case in StorageFileListPanelComponent.swift
and dropping import Postbox. StorageUsageScreen (the module as a whole)
is now fully Postbox-free.

Icon enum split:
  case media(Media, TelegramMediaImageRepresentation)  ->
    case mediaFile(TelegramMediaFile, TelegramMediaImageRepresentation)
    case mediaImage(TelegramMediaImage, TelegramMediaImageRepresentation)

Equatable rewritten as switch-over-tuple with id-based equality per
concrete type (lFile.fileId == rFile.fileId / lImage.imageId ==
rImage.imageId), same semantics as the old media.id comparison.

Binding site: `if case let .media(media, representation)` +
`as? TelegramMediaFile` / `as? TelegramMediaImage` downcasts ->
compound case-binding `case let .mediaFile(_, representation), let
.mediaImage(_, representation):` to lift the shared representation
variable, plus an inner switch for the setSignal branch. The compiler-
enforced exhaustiveness of the split improves call-site safety.

Construction sites (2): `.media(file, representation)` -> `.mediaFile(
file, representation)`, `.media(image, representation)` -> `.mediaImage(
image, representation)`.

Placeholder fixup:
  messageId: EngineMessage.Id(peerId: PeerId(namespace: PeerId.Namespace
    ._internalFromInt32Value(0), id: PeerId.Id._internalFromInt64Value(0)
    ), namespace: 0, id: 0)
  ->
  messageId: EngineMessage.Id(peerId: component.context.account.peerId,
    namespace: 0, id: 0)

Inside a measureItem layout-measurement instance. Caught by second-pass
build failure `cannot find 'PeerId' in scope`. PeerId / PeerId.Namespace
/ PeerId.Id are raw Postbox types (not TelegramCore typealiases —
consistent with wave 9's MessageId -> EngineMessage.Id fixup). Using
context.account.peerId is semantically equivalent for the measurement
use case (messageId only feeds image-fetch userLocation and Equatable
comparison, neither exercised for this standalone instance).

Net: 1 file changed, +22 / -29 lines.

Plan: docs/superpowers/plans/2026-04-20-postbox-to-telegramengine-wave-10.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 01:46:18 +02:00
..
…
2026-03-10 00:38:36 +01:00
2026-03-30 20:44:10 +08:00
2026-02-06 17:14:35 +04:00
2026-02-02 15:54:43 +04:00
2026-02-13 18:15:03 +04:00
2026-03-10 00:38:36 +01:00
2026-03-10 00:38:36 +01:00
2026-03-24 16:47:36 +08:00
2026-04-17 09:06:14 +02:00
2026-02-15 22:50:18 +04:00
2026-04-14 15:33:19 +02:00
2026-04-18 08:41:08 +02:00
2026-04-14 03:33:34 +02:00
2026-03-13 14:54:44 +01:00
2026-03-06 13:20:49 +01:00
2026-02-13 12:23:53 +04:00
2026-04-17 11:06:56 +02:00
2026-03-20 15:46:56 +01:00
2026-03-30 17:23:39 +02:00
2026-04-03 15:50:39 +08:00
2026-04-16 01:18:22 +02:00
2026-04-16 01:18:22 +02:00
2026-03-13 11:04:33 +01:00
…
2026-04-14 03:33:34 +02:00
2026-04-14 04:53:01 +02:00
2026-03-22 16:41:22 +01:00
2026-02-27 14:34:18 +04:00
2026-04-14 03:33:34 +02:00
2026-03-29 17:42:24 +02:00
2026-04-03 15:50:39 +08:00
2026-04-03 15:50:39 +08:00
2026-04-18 08:41:08 +02:00
2026-03-30 02:55:35 +02:00
2026-04-16 00:03:09 +02:00
2026-04-14 03:33:34 +02:00
2026-04-17 09:06:14 +02:00
2026-02-24 21:44:29 +04:00
2026-04-10 14:30:23 +02:00
2026-02-02 15:54:43 +04:00
…
2026-04-03 15:50:39 +08:00
2026-01-13 19:21:49 +04:00
2026-03-31 13:51:10 +02:00
…
2026-03-31 20:24:24 +08:00
2026-04-16 01:18:22 +02:00
2026-04-10 14:30:23 +02:00
2026-04-07 16:47:08 +02:00
2026-04-18 08:41:08 +02:00
2026-04-17 11:06:56 +02:00
2026-04-15 23:12:53 +02:00
2026-04-16 01:18:22 +02:00
…
2026-03-18 00:27:13 +01:00
2026-04-03 22:15:42 +08:00
2026-03-31 20:24:24 +08:00
2026-03-23 21:33:34 +08:00
2026-01-25 22:17:49 +04:00
2026-02-24 19:12:54 +04:00
2026-04-17 11:06:56 +02:00
2026-02-13 18:09:41 +04:00
2026-03-27 01:13:38 +01:00
2026-03-06 18:13:48 +01:00
2026-04-14 03:33:34 +02:00
2026-01-14 22:58:31 +04:00
2026-04-17 11:06:56 +02:00
2026-01-27 21:04:08 +08:00
2026-03-30 20:44:10 +08:00