// // NewsView.swift // // // Created by MainasuK on 2022-4-13. // import UIKit import Combine import MastodonAsset public final class NewsView: UIView { static let imageViewWidth: CGFloat = 132 var disposeBag = Set() let container = UIStackView() let providerFaviconImageView: UIImageView = { let imageView = UIImageView() imageView.contentMode = .scaleAspectFit imageView.layer.masksToBounds = true imageView.layer.cornerRadius = 2 imageView.layer.cornerCurve = .continuous return imageView }() let providerNameLabel: UILabel = { let label = UILabel() label.font = UIFontMetrics(forTextStyle: .footnote).scaledFont(for: .systemFont(ofSize: 13, weight: .semibold)) label.textColor = Asset.Colors.Label.primary.color return label }() let headlineLabel: UILabel = { let label = UILabel() label.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold)) label.textColor = Asset.Colors.Label.primary.color label.numberOfLines = 0 return label }() let footnoteLabel: UILabel = { let label = UILabel() label.font = UIFontMetrics(forTextStyle: .caption1).scaledFont(for: .systemFont(ofSize: 12, weight: .medium)) label.textColor = Asset.Colors.Label.secondary.color return label }() let imageView = MediaView() // let imageView = UIImageView() // var imageViewMediaConfiguration: MediaView.Configuration? public func prepareForReuse() { providerFaviconImageView.tag = (0..