Add IconImage to encapsulate our icon processing logic

This commit is contained in:
Maurice Parker
2019-11-05 18:05:57 -06:00
parent 05e0e34f6b
commit 560f36621f
46 changed files with 336 additions and 323 deletions

View File

@@ -14,7 +14,7 @@ struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout {
let height: CGFloat
let unreadIndicatorRect: CGRect
let starRect: CGRect
let avatarImageRect: CGRect
let iconImageRect: CGRect
let titleRect: CGRect
let summaryRect: CGRect
let feedNameRect: CGRect
@@ -37,12 +37,12 @@ struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout {
// Separator Insets
self.separatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
// Avatar
if cellData.showAvatar {
self.avatarImageRect = MasterTimelineAccessibilityCellLayout.rectForAvatar(currentPoint)
currentPoint.y = self.avatarImageRect.maxY
// Icon Image
if cellData.showIcon {
self.iconImageRect = MasterTimelineAccessibilityCellLayout.rectForIconView(currentPoint)
currentPoint.y = self.iconImageRect.maxY
} else {
self.avatarImageRect = CGRect.zero
self.iconImageRect = CGRect.zero
}
let textAreaWidth = width - (currentPoint.x + MasterTimelineDefaultCellLayout.cellPadding.right + insets.right)