Commit graph

38 commits

Author SHA1 Message Date
Ilya Laktyushin
ec8bd9acdd Various improvements 2026-06-04 01:44:36 +02:00
isaac
13a153aff2 WIP 2026-05-20 00:33:08 +08:00
isaac
69bfc65da7 Postbox refactor waves 138–276: 168-commit squash
Consolidates 137 wave commits + 31 supporting commits (CLAUDE.md bump,
typealias additions, AnyObject→EngineMedia restoration) into one squashed
commit. Migrates dozens of consumer-side public APIs, struct fields,
protocol methods, and enum payloads from Postbox protocols/structs to
TelegramEngine engine wrappers and typealiases. Drops `import Postbox`
from many files. Adds new TelegramCore typealiases and one
TelegramEngineUnauthorized facade.

Notable changes by category:

**TelegramCore typealias additions** (rule 2 — narrow utility typealiases):
- EngineChatListIndex, EngineTempBoxFile, EngineItemCollectionItemIndex,
  EngineItemCollectionViewEntryIndex, EngineValueBoxEncryptionParameters,
  EngineMessageAndThreadId, EnginePeerStoryStats, EngineMessageHistoryAnchorIndex,
  EngineChatListTotalUnreadStateCategory, EngineChatListTotalUnreadStateStats,
  EnginePeerSummaryCounterTags, EngineChatListTotalUnreadState,
  EngineItemCacheEntryId, EngineHashFunctions,
  EngineCachedMediaResourceRepresentationResult,
  EngineMediaResourceDataFetchResult, EngineMediaResourceDataFetchError,
  EngineMediaResourceStatus, EngineCachedPeerData

**TelegramCore engine extensions/forwarders**:
- EngineMessage.engineMedia, EngineMessage.enginePeers,
  EngineMessage.adAttribute, EngineMessage.effectivelyIncoming
- engineFileSize forwarder
- TelegramEngine.Resources.clearCachedMediaResources(mediaResourceIds: Set<EngineMediaResource.Id>)
- TelegramEngine.Resources.fetchStatus(id:resourceSize:)
- TelegramEngineUnauthorized.UnauthorizedResources facade with storeResourceData

**Public API/struct migrations to engine types**:
- ChatAvailableMessageActions.banAuthor/banAuthors → EnginePeer?/[EnginePeer]
- WebSessionsContextState.peers → [EnginePeer.Id: EnginePeer]
- CacheUsageStats.peers → [EnginePeer.Id: EnginePeer]
- PeerCommand.peer → EnginePeer
- PeerInfoControllerMode.calls(messages:) → [EngineMessage]
- CallControllerNodeProtocol.updatePeer → EnginePeer params
- ChatHistoryListNode.messageInCurrentHistoryView (and 4 variants) → EngineMessage?
- ChatHistorySearchContainerNode.messageForGallery → EngineMessage?
- PeerInfoPaneNode.findLoadedMessage / ensureMessageIsVisible /
  transitionNodeForGallery → engine-typed
- GalleryHiddenMediaTarget.getTransitionInfo /
  GalleryHiddenMediaManager.findTarget → engine-typed
- ChatPanelInterfaceInteraction.presentReactionDeletionOptions /
  presentBan*MessageOptions → EnginePeer
- DrawingMessageRenderer.messages → [EngineMessage]
- ChatVideoGalleryItemScrubberView.setFetchStatusSignal →
  EngineMediaResource.FetchStatus
- ChannelDiscussionGroupActionSheetItem.peer, VoiceChatPeerEntry.peer,
  VoiceChatFullscreenParticipantItem.peer, MediaStreamComponent.chatPeer,
  MediaStreamVideoComponent.callPeer, ChatMessageContactBubbleContentNode.contactPeer,
  ChatMessageForwardInfoNode.peer, ChatMessageCommentFooterContentNode.replyPeers,
  ChatReportPeerTitlePanelNode.peer, ChatMessageActionUrlAuthController.bot,
  PeerMediaCollectionInterfaceState.peer, ChatMessageCallBubbleContentNode.peopleAvatars,
  ChatLoadingNode.renderedPeer (→ EngineRenderedPeer) — all to engine types

**Wave-71-shadow stored-field migrations** (Postbox Peer/Message → Engine wrapper):
- LegacyCallControllerNode.peer
- CallStatusBarNode.currentPeer

**Dead-code / dead-field removals**:
- CallController.peer, CallControllerNodeV2.account,
  ContactMultiselectionController PeerNameIndex fields,
  preparedChatListNodeViewTransition account: Account param,
  FetchResource.swift entirely (unused function)

**Module-level Postbox import drops**: 30+ files including TelegramRootController,
EditStories, GiftViewScreen, AnimatedStickerUtils, FetchPhotoLibraryImageResource,
PeerInfoGiftsPaneNode, PeerInfoPaneContainerNode, PresentAddMembers,
PeerInfoProfileItems, ChatControllerAdminBanUsers, PresentationData typealiases,
DefaultDayPresentationTheme, ChatListViewTransition, GalleryHiddenMediaManager,
RecentSessionsController, GifContext, AuthorizationSequenceController,
PeerInfoHeaderEditingContentNode, PeerInfoHeaderNode,
PeerAllowedReactionListController, CallControllerNodeV2, and 6 PeerInfo pane files.

**AnyObject restoration**: rule 8 added (never substitute Postbox protocols
with Any/AnyObject) — undid previous AnyObject substitutions in waves 141/143
back to EngineMedia.

Doc maintenance: CLAUDE.md updated to reflect new typealiases and forwarders.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:44:27 +02:00
Ilya Laktyushin
14bbdca050 Various improvements 2026-04-29 20:24:29 +02:00
Ilya Laktyushin
06a0031bdd Various improvements 2026-04-29 18:22:42 +02:00
Ilya Laktyushin
73d25e7be3 Various improvements 2026-04-28 14:31:17 +02:00
Ilya Laktyushin
5f7bcb7746 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-04-25 17:41:48 +02:00
Ilya Laktyushin
9c15b8c27d Various improvements 2026-04-25 17:32:26 +02:00
isaac
493f3103b3 Postbox -> TelegramEngine waves 37-43 + wave 44 design/plan (squashed)
Squashes 20 commits — the implementation and outcome commits of
waves 37 through 43 plus wave 44's spec and implementation-plan
docs — into a single commit. Per-wave lessons remain recorded in
docs/superpowers/postbox-refactor-log.md. The unrelated "Add swift
svg" commit is preserved separately outside this squash.

Wave 37 — peerTokenTitle: peer Peer → EnginePeer (1 file)
Wave 38 — canSendMessagesToPeer: peer Peer → EnginePeer (12 files)
Wave 39 — AccountContext.makePeerInfoController: peer Peer → EnginePeer (52 files)
Wave 40 — makeChatQrCodeScreen + makeChatRecentActionsController bundle (8 files)
Wave 41 — RenderedChannelParticipant.peer: Peer → EnginePeer (28 files)
Wave 42 — PeerInfoScreenData.peer: Peer? → EnginePeer? (17 files)
Wave 43 — PeerInfoScreen 6 helpers: peer Peer? → EnginePeer? (12 files)
Wave 44 — RenderedChannelParticipant.peers design doc + implementation plan
         (impl and outcome land in subsequent commits, not part of squash)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 23:19:43 +04:00
Ilya Laktyushin
f41630083a Various improvements 2026-04-24 03:16:14 +02:00
Ilya Laktyushin
dbd40fe7d3 Various improvements 2026-04-22 23:03:51 +02:00
Ilya Laktyushin
2edce5ebf2 Alerts 2025-12-22 00:19:11 +04:00
Isaac
1ee7268488 Glass 2025-12-06 01:28:06 +08:00
Isaac
cebadbbf3d Stories 2025-11-14 01:34:10 +08:00
Ilya Laktyushin
4432581c77 Various improvements 2025-10-31 18:13:30 +04:00
Ilya Laktyushin
5877f2c20d Various improvements 2025-10-29 17:20:36 +04:00
Isaac
adbc7bad61 Various improvements 2025-07-01 14:57:33 +02:00
Isaac
3ed857bfc3 Various improvements 2025-06-29 18:15:50 +02:00
Isaac
a78224b965 Add scheduled messages post alert 2025-06-27 00:15:15 +02:00
Isaac
69feac4d97 Various improvements 2025-06-03 23:07:46 +08:00
Isaac
2fd6f40884 Ban monoforum users in the channel 2025-05-29 13:30:08 +08:00
Isaac
4bed1703a2 Emoji in chat folders 2024-12-25 00:17:19 +08:00
Ilya Laktyushin
4a0d46047c Merge branch 'master' into stars-subscriptions 2024-08-05 20:27:26 +02:00
Isaac
ad4c5a181b Don't delay message deletion when not necessary 2024-08-02 22:38:34 +08:00
Ilya Laktyushin
dc68eab568 Merge branch 'master' into stars-subscriptions 2024-07-30 11:29:42 +02:00
Isaac
649b7e4ee6 Various improvements 2024-07-12 13:37:14 +04:00
Isaac
47555ae97d Update localization 2024-06-17 21:16:22 +04:00
Isaac
d7bb7d55b4 - Story search UI
- Delete message confirmation
2024-06-04 19:18:41 +04:00
Isaac
16faaa4575 [WIP] Send message effects 2024-05-03 22:56:50 +04:00
Isaac
3b719ede86 Update localization 2024-04-23 13:37:42 +04:00
Isaac
59f4ec2cdd Chat moderation improvements 2024-04-22 20:50:06 +04:00
Isaac
179228226b Various improvements 2024-04-19 17:57:13 +04:00
Isaac
e2a3decea3 Various improvements 2024-04-19 17:16:12 +04:00
Isaac
e938cecd37 Fix emoji input background 2024-04-19 13:30:06 +04:00
Isaac
eed644e895 Improve poll creation 2024-04-19 13:18:04 +04:00
Isaac
7f7d0f1c74 Add recent actions settings sheet 2024-04-19 01:04:01 +04:00
Isaac
2d65b3d90b Moderation sheet improvements 2024-04-19 00:00:04 +04:00
Isaac
5123b841c3 - custom poll emoji input
- avatars in forward info
- ban user sheet
2024-04-16 23:42:39 +04:00