Update timeline theme. Issue #1169

This commit is contained in:
Maurice Parker
2019-10-25 15:52:32 -05:00
parent cf7ea99cb6
commit 21aaf71cbf
5 changed files with 53 additions and 3 deletions

View File

@@ -23,6 +23,12 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
return NonIntrinsicImageView(image: AppAssets.timelineStarImage)
}()
private let separatorAccent: UIView = {
let view = UIView()
view.backgroundColor = UIColor.white
return view
}()
var cellData: MasterTimelineCellData! {
didSet {
updateSubviews()
@@ -43,6 +49,8 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
summaryView.highlightedTextColor = highlightedTextColor
dateView.highlightedTextColor = highlightedTextColor
feedNameView.highlightedTextColor = highlightedTextColor
backgroundColor = AppAssets.timelineBackgroundColor
}
override var frame: CGRect {
@@ -82,6 +90,10 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
separatorInset = layout.separatorInsets
if traitCollection.userInterfaceStyle == .light {
let separatorAccentRect = CGRect(x: safeAreaInsets.left, y: frame.height - 2, width: frame.width - safeAreaInsets.right - safeAreaInsets.left, height: 1)
separatorAccent.setFrameIfNotEqual(separatorAccentRect)
}
}
func setAvatarImage(_ image: UIImage) {
@@ -137,7 +149,8 @@ private extension MasterTimelineTableViewCell {
addSubviewAtInit(feedNameView, hidden: true)
addSubviewAtInit(avatarView, hidden: true)
addSubviewAtInit(starView, hidden: true)
addSubviewAtInit(separatorAccent, hidden: false)
}
func updatedLayout(width: CGFloat) -> MasterTimelineCellLayout {