Files
Leeksov 4647310322 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.
2026-04-06 09:48:12 +03:00

54 lines
1.1 KiB
Swift

//
// AnimationImageProvider.swift
// Lottie_iOS
//
// Created by Alexandr Goncharov on 07/06/2019.
//
import Foundation
// MARK: - AnimationTextProvider
/// Text provider is a protocol that is used to supply text to `AnimationView`.
public protocol AnimationTextProvider: AnyObject {
func textFor(keypathName: String, sourceText: String) -> String
}
// MARK: - DictionaryTextProvider
/// Text provider that simply map values from dictionary
public final class DictionaryTextProvider: AnimationTextProvider {
// MARK: Lifecycle
public init(_ values: [String: String]) {
self.values = values
}
// MARK: Public
public func textFor(keypathName: String, sourceText: String) -> String {
values[keypathName] ?? sourceText
}
// MARK: Internal
let values: [String: String]
}
// MARK: - DefaultTextProvider
/// Default text provider. Uses text in the animation file
public final class DefaultTextProvider: AnimationTextProvider {
// MARK: Lifecycle
public init() {}
// MARK: Public
public func textFor(keypathName _: String, sourceText: String) -> String {
sourceText
}
}