GLEGram 12.5 — Initial public release

Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
This commit is contained in:
Leeksov
2026-04-06 09:48:12 +03:00
commit 4647310322
39685 changed files with 11052678 additions and 0 deletions
@@ -0,0 +1,32 @@
import Foundation
public final class Action<Arguments> {
public let action: (Arguments) -> Void
public init(_ action: @escaping (Arguments) -> Void) {
self.action = action
}
public func callAsFunction(_ arguments: Arguments) {
self.action(arguments)
}
}
public final class ActionSlot<Arguments>: Equatable {
private var target: ((Arguments) -> Void)?
public init() {
}
public static func ==(lhs: ActionSlot<Arguments>, rhs: ActionSlot<Arguments>) -> Bool {
return lhs === rhs
}
public func connect(_ target: @escaping (Arguments) -> Void) {
self.target = target
}
public func invoke(_ arguments: Arguments) {
self.target?(arguments)
}
}
@@ -0,0 +1,8 @@
import Foundation
import UIKit
extension UIColor {
convenience init(rgb: UInt32) {
self.init(red: CGFloat((rgb >> 16) & 0xff) / 255.0, green: CGFloat((rgb >> 8) & 0xff) / 255.0, blue: CGFloat(rgb & 0xff) / 255.0, alpha: 1.0)
}
}
@@ -0,0 +1,9 @@
import Foundation
public func Condition<R>(_ f: @autoclosure () -> Bool, _ pass: () -> R) -> R? {
if f() {
return pass()
} else {
return nil
}
}
@@ -0,0 +1,28 @@
import Foundation
final class EscapeGuard {
final class Status {
fileprivate(set) var isDeallocated: Bool = false
}
let status = Status()
deinit {
self.status.isDeallocated = true
}
}
public final class EscapeNotification: NSObject {
let deallocated: () -> Void
public init(_ deallocated: @escaping () -> Void) {
self.deallocated = deallocated
}
deinit {
self.deallocated()
}
public func keep() {
}
}
@@ -0,0 +1,8 @@
import Foundation
import UIKit
public extension UIEdgeInsets {
init(_ value: CGFloat) {
self.init(top: value, left: value, bottom: value, right: value)
}
}
@@ -0,0 +1,8 @@
import Foundation
import UIKit
public extension CGRect {
var center: CGPoint {
return CGPoint(x: self.midX, y: self.midY)
}
}
@@ -0,0 +1,28 @@
import Foundation
import UIKit
public extension CGSize {
func centered(in rect: CGRect) -> CGRect {
return CGRect(origin: CGPoint(x: rect.minX + floor((rect.width - self.width) / 2.0), y: rect.minY + floor((rect.height - self.height) / 2.0)), size: self)
}
func centered(around position: CGPoint) -> CGRect {
return CGRect(origin: CGPoint(x: position.x - self.width / 2.0, y: position.y - self.height / 2.0), size: self)
}
func leftCentered(in rect: CGRect) -> CGRect {
return CGRect(origin: CGPoint(x: rect.minX, y: rect.minY + floor((rect.height - self.height) / 2.0)), size: self)
}
func rightCentered(in rect: CGRect) -> CGRect {
return CGRect(origin: CGPoint(x: rect.maxX - self.width, y: rect.minY + floor((rect.height - self.height) / 2.0)), size: self)
}
func topCentered(in rect: CGRect) -> CGRect {
return CGRect(origin: CGPoint(x: rect.minX + floor((rect.width - self.width) / 2.0), y: 0.0), size: self)
}
func bottomCentered(in rect: CGRect) -> CGRect {
return CGRect(origin: CGPoint(x: rect.minX + floor((rect.width - self.width) / 2.0), y: rect.maxY - self.height), size: self)
}
}