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,47 @@
import Foundation
import Postbox
import TelegramCore
import SwiftSignalKit
public enum WebSearchScope: Int32 {
case images
case gifs
}
public struct WebSearchSettings: Codable, Equatable {
public var scope: WebSearchScope
public static var defaultSettings: WebSearchSettings {
return WebSearchSettings(scope: .images)
}
public init(scope: WebSearchScope) {
self.scope = scope
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: StringCodingKey.self)
self.scope = WebSearchScope(rawValue: try container.decode(Int32.self, forKey: "scope")) ?? .images
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: StringCodingKey.self)
try container.encode(self.scope.rawValue, forKey: "scope")
}
}
public func updateWebSearchSettingsInteractively(accountManager: AccountManager<TelegramAccountManagerTypes>, _ f: @escaping (WebSearchSettings) -> WebSearchSettings) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.webSearchSettings, { entry in
let currentSettings: WebSearchSettings
if let entry = entry?.get(WebSearchSettings.self) {
currentSettings = entry
} else {
currentSettings = .defaultSettings
}
return PreferencesEntry(f(currentSettings))
})
}
}