mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-24 03:46:23 +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.
37 lines
962 B
Swift
37 lines
962 B
Swift
import Foundation
|
|
import UIKit
|
|
import Display
|
|
import TelegramPresentationData
|
|
import AsyncDisplayKit
|
|
|
|
final class LockedWindowCoveringView: WindowCoveringView {
|
|
private let contentView: UIImageView
|
|
|
|
init(theme: PresentationTheme) {
|
|
self.contentView = UIImageView()
|
|
|
|
super.init(frame: CGRect())
|
|
|
|
self.backgroundColor = theme.chatList.backgroundColor
|
|
self.addSubview(self.contentView)
|
|
}
|
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
func updateTheme(_ theme: PresentationTheme) {
|
|
self.backgroundColor = theme.chatList.backgroundColor
|
|
}
|
|
|
|
func updateSnapshot(_ image: UIImage?) {
|
|
if image != nil {
|
|
self.contentView.image = image
|
|
}
|
|
}
|
|
|
|
override func updateLayout(_ size: CGSize) {
|
|
self.contentView.frame = CGRect(origin: CGPoint(), size: size)
|
|
}
|
|
}
|