Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,34 @@
final class SearchHistoryCell: MWMTableViewCell {
enum Content {
case query(String)
case clear
}
static private let placeholderImage = UIImage.filled(with: .clear, size: CGSize(width: 28, height: 28))
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: .default, reuseIdentifier: reuseIdentifier)
setStyle(.defaultTableViewCell)
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func configure(for content: Content) {
switch content {
case .query(let query):
textLabel?.text = query
textLabel?.setFontStyleAndApply(.regular17, color: .blackSecondary)
imageView?.image = UIImage(resource: .icSearch)
imageView?.setStyleAndApply(.black)
isSeparatorHidden = false
case .clear:
textLabel?.text = L("clear_search")
textLabel?.setFontStyleAndApply(.regular14, color: .linkBlue)
imageView?.image = Self.placeholderImage
isSeparatorHidden = true
}
}
}