Files
ichmagmaus111andClaude Opus 5.5 0622057a4f Ghostgram: open-source release
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:57:09 +01:00

37 lines
1.4 KiB
Swift

import Foundation
import SwiftSignalKit
import GGCore
/// Entry point of the GGProfileExport feature module (W4-1): the GCONNECT nick badge, fake gifts,
/// chat export.
public enum GGProfileExportModule {
private static var fakeGiftsDisposable: Disposable?
/// Declares settings, menu rows, hook handlers and migrations. Called once on the main
/// thread from `GGFeatures.registerAll()`, before `GGHookRegistry.freeze()`.
public static func register() {
assert(Thread.isMainThread)
GGNickBadgeSettings.declare()
GGFakeGiftsSettings.declare()
GGChatExportSettings.declare()
GGFakeGiftsLegacy.registerMigrations()
// Nick badge: slots, the network side (off until the user turns badges on), menu.
GGNickBadgeSlots.register()
GGNickBadgeMenu.register()
GGNickBadgeService.shared.start()
// Fake gifts: the profile's list, the gift screen's menu, the store per account.
GGFakeGiftsHooks.register()
GGFakeGiftsMenu.register()
GGProfileExportModule.fakeGiftsDisposable = (GGFakeGiftsSettings.isEnabled.signal
|> distinctUntilChanged).start(next: { enabled in
GGFakeGiftsStore.shared.setEnabled(enabled)
})
// Chat export: entry points; temporary trees of old jobs are removed off the main thread.
GGChatExportMenu.register()
GGChatExportManager.shared.removeStaleJobs()
}
}