Files
GLEGram-iOS/submodules/TelegramUI/Components/ChatListTitleView/Sources/ChatListTitleLockView.swift
T
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

47 lines
1.3 KiB
Swift

import Foundation
import UIKit
import Display
import TelegramPresentationData
public final class ChatListTitleLockView: UIView {
private let topView: UIImageView
private let bottomView: UIImageView
private var theme: PresentationTheme?
override public init(frame: CGRect) {
self.topView = UIImageView()
self.bottomView = UIImageView()
super.init(frame: frame)
self.addSubview(self.topView)
self.addSubview(self.bottomView)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
public func updateTheme(_ theme: PresentationTheme) {
if self.theme !== theme {
self.theme = theme
self.topView.image = PresentationResourcesChatList.lockTopUnlockedImage(theme)
self.bottomView.image = PresentationResourcesChatList.lockBottomUnlockedImage(theme)
self.layoutItems()
}
}
private func layoutItems() {
self.topView.frame = CGRect(x: 7.0, y: 0.0, width: 7.0, height: 6.0)
self.bottomView.frame = CGRect(x: 0.0, y: 6.0, width: 10.0, height: 8.0)
}
override public func layoutSubviews() {
super.layoutSubviews()
self.layoutItems()
}
}