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>
57 lines
3.2 KiB
Swift
57 lines
3.2 KiB
Swift
import Postbox
|
|
|
|
public typealias EngineMemoryBuffer = MemoryBuffer
|
|
public typealias EnginePostboxDecoder = PostboxDecoder
|
|
public typealias EnginePostboxEncoder = PostboxEncoder
|
|
public typealias EngineAdaptedPostboxDecoder = AdaptedPostboxDecoder
|
|
public typealias EngineAdaptedPostboxEncoder = AdaptedPostboxEncoder
|
|
public typealias EngineItemCollectionId = ItemCollectionId
|
|
public typealias EngineStoryId = StoryId
|
|
public typealias EngineFetchResourceSourceType = FetchResourceSourceType
|
|
public typealias EngineFetchResourceError = FetchResourceError
|
|
public typealias EngineCodableEntry = CodableEntry
|
|
public typealias EngineNoticeEntryKey = NoticeEntryKey
|
|
public typealias EngineChatListIndex = ChatListIndex
|
|
public typealias EngineTempBoxFile = TempBoxFile
|
|
public typealias EngineItemCollectionItemIndex = ItemCollectionItemIndex
|
|
public typealias EngineItemCollectionViewEntryIndex = ItemCollectionViewEntryIndex
|
|
public typealias EngineValueBoxEncryptionParameters = ValueBoxEncryptionParameters
|
|
public typealias EngineMessageAndThreadId = MessageAndThreadId
|
|
public typealias EnginePeerStoryStats = PeerStoryStats
|
|
public typealias EngineMessageHistoryAnchorIndex = MessageHistoryAnchorIndex
|
|
public typealias EngineMessageHistoryEntryLocation = MessageHistoryEntryLocation
|
|
public typealias EngineChatListTotalUnreadStateCategory = ChatListTotalUnreadStateCategory
|
|
public typealias EngineChatListTotalUnreadStateStats = ChatListTotalUnreadStateStats
|
|
public typealias EngineChatListTotalUnreadState = ChatListTotalUnreadState
|
|
public typealias EngineItemCacheEntryId = ItemCacheEntryId
|
|
public typealias EnginePeerSummaryCounterTags = PeerSummaryCounterTags
|
|
public typealias EngineHashFunctions = HashFunctions
|
|
public typealias EngineCachedMediaResourceRepresentationResult = CachedMediaResourceRepresentationResult
|
|
public typealias EngineMediaResourceDataFetchResult = MediaResourceDataFetchResult
|
|
public typealias EngineMediaResourceDataFetchError = MediaResourceDataFetchError
|
|
public typealias EngineMediaResourceStatus = MediaResourceStatus
|
|
public typealias EnginePostboxCoding = PostboxCoding
|
|
public typealias EngineRawItemCollectionInfo = ItemCollectionInfo
|
|
public typealias EngineRawItemCollectionItem = ItemCollectionItem
|
|
public typealias EngineRawMedia = Media
|
|
public typealias EngineRawMessage = Message
|
|
public typealias EngineRawPeer = Peer
|
|
public typealias EngineRawMediaResource = MediaResource
|
|
public typealias EngineRawMediaResourceId = MediaResourceId
|
|
public typealias EngineRawMediaResourceData = MediaResourceData
|
|
public typealias EngineRawMediaResourceDataFetchCopyLocalItem = MediaResourceDataFetchCopyLocalItem
|
|
public typealias EngineRawCachedMediaResourceRepresentation = CachedMediaResourceRepresentation
|
|
public typealias EngineCachedMediaRepresentationKeepDuration = CachedMediaRepresentationKeepDuration
|
|
public typealias EngineCachedPeerData = CachedPeerData
|
|
|
|
public func engineFileSize(_ path: String, useTotalFileAllocatedSize: Bool = false) -> Int64? {
|
|
return fileSize(path, useTotalFileAllocatedSize: useTotalFileAllocatedSize)
|
|
}
|
|
|
|
public func enginePersistentHash32(_ string: String) -> Int32 {
|
|
return persistentHash32(string)
|
|
}
|
|
|
|
public func engineDeclareEncodable(_ type: Any.Type, f: @escaping (EnginePostboxDecoder) -> EnginePostboxCoding) {
|
|
declareEncodable(type, f: f)
|
|
}
|