mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-05-01 23:35:13 +02:00
4647310322
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.
44 lines
673 B
Swift
44 lines
673 B
Swift
//
|
|
// SingleValueProvider.swift
|
|
// lottie-swift
|
|
//
|
|
// Created by Brandon Withrow on 1/30/19.
|
|
//
|
|
|
|
import Foundation
|
|
import QuartzCore
|
|
|
|
/// Returns a value for every frame.
|
|
final class SingleValueProvider<ValueType: AnyInterpolatable>: ValueProvider {
|
|
|
|
// MARK: Lifecycle
|
|
|
|
init(_ value: ValueType) {
|
|
self.value = value
|
|
}
|
|
|
|
// MARK: Internal
|
|
|
|
var value: ValueType {
|
|
didSet {
|
|
hasUpdate = true
|
|
}
|
|
}
|
|
|
|
var storage: ValueProviderStorage<ValueType> {
|
|
.singleValue(value)
|
|
}
|
|
|
|
var valueType: Any.Type {
|
|
ValueType.self
|
|
}
|
|
|
|
func hasUpdate(frame _: CGFloat) -> Bool {
|
|
hasUpdate
|
|
}
|
|
|
|
// MARK: Private
|
|
|
|
private var hasUpdate = true
|
|
}
|