How bla1r1/legacytg works
LegacyTG is a Telegram client for older iOS devices: UIKit screens sit over a TDLib-backed client, with capabilities adjusted for device tier. The principal flow is user sign-in, then chat and account interactions through the client to Telegram; the README documents this overall relationship but sampled headers do not expose the screen-to-client call sites. Other major branches include profiles, settings, media playback, and encrypted calls. Dashed links mark integrations whose wiring was not shown in the excerpts.
Main entry points: TGClient.h TDLib client · TGSettingsViewControllerInternal.h Settings · RootViewController.h App navigation · TGLoginViewControllerInternal.h Sign-in screens
Components 23
App and UI
- App navigation
src/App/RootViewController.h - Shared UIKit
src/UI/Controllers/TGRowsViewController.h
Client and state
- TDLib client
src/Core/Client/TGClient.h - Client state stores
src/Core/Stores
User features
- Sign-in screens
src/Features/Auth/TGLoginViewControllerInternal.h - Chat experience
src/Features/Chat/TGChatViewControllerInternal.h - Chat list
src/Features/ChatList/TGChatListViewControllerInternal.h - Profiles
src/Features/Profile/TGProfileViewControllerInternal.h - Settings
src/Features/Settings/TGSettingsViewControllerInternal.h - Business tools
src/Features/Business - Payments and gifts
src/Features/BotsPayments - Groups and channels
src/Features/Groups - Call screens
src/Features/Calls
Media and calls
- Call engine
src/CallEngine/TGCall.h - Audio playback
src/Audio/TGMusicPlayer.h - Video playback
src/Media/TGSoftVideoPlayer.h - Call video
src/CallEngine/Media/TGCallVideoEngine.h - Video lag control
src/Media/TGSoftVideoClock.c - Video clock API
src/Media/TGSoftVideoClock.h
Platform and presentation
- Device capabilities
src/Core/Platform/TGCapabilities.h - Themes and styling
src/Core/Style/TGTheme.h
Other components
- User
- TDLib
Connections 20
- User → App navigation: opens app
README.md - App navigation → Sign-in screens: offers sign-in
- Sign-in screens → TDLib client: requests authentication
- TDLib client → TDLib: bridges to
README.md - Chat experience → TDLib client: uses client
- Chat list → TDLib client: uses client
- Profiles → TDLib client: uses client
- Settings → TDLib client: uses client
- Business tools → TDLib client: uses client
- Payments and gifts → TDLib client: uses client
- Groups and channels → TDLib client: uses client
- TDLib client → Client state stores: maintains state
- Call screens → Call engine: uses call engine
- Call engine → Call video: uses video engine
- Video lag control → Video clock API: implements API
src/Media/TGSoftVideoClock.c - App navigation → Shared UIKit: presents screens
- Settings → Device capabilities: shows device tier
README.md - Settings → Themes and styling: configures appearance
README.md - Audio playback → TDLib: plays Telegram media
- Video playback → TDLib: plays Telegram media