Align separator insets with first letter of name

This commit is contained in:
Maurice Parker 2019-04-28 14:56:36 -05:00
parent 00f19f47aa
commit 00cb29c5c1
2 changed files with 5 additions and 0 deletions

View File

@ -177,6 +177,7 @@ private extension MasterFeedTableViewCell {
titleView.setFrameIfNotEqual(layout.titleRect)
unreadCountView.setFrameIfNotEqual(layout.unreadCountRect)
disclosureButton?.setFrameIfNotEqual(layout.disclosureButtonRect)
separatorInset = layout.separatorInsets
}
}

View File

@ -26,6 +26,7 @@ struct MasterFeedTableViewCellLayout {
let titleRect: CGRect
let unreadCountRect: CGRect
let disclosureButtonRect: CGRect
let separatorInsets: UIEdgeInsets
let height: CGFloat
@ -47,6 +48,9 @@ struct MasterFeedTableViewCellLayout {
rFavicon = CGRect(x: bounds.origin.x, y: 0.0, width: MasterFeedTableViewCellLayout.imageSize.width, height: MasterFeedTableViewCellLayout.imageSize.height)
}
// Separator Insets
separatorInsets = UIEdgeInsets(top: 0, left: rFavicon.maxX + MasterFeedTableViewCellLayout.imageMarginRight, bottom: 0, right: 0)
// Unread Count
let unreadCountSize = unreadCountView.intrinsicContentSize
let unreadCountIsHidden = unreadCountView.unreadCount < 1