Merge pull request #1890 from flowinho/ios-release

Align feedname and date correctly if there is no title or summary
This commit is contained in:
Maurice Parker 2020-03-12 17:03:58 -05:00 committed by GitHub
commit c19bf93586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -89,7 +89,14 @@ struct MasterTimelineDefaultCellLayout: MasterTimelineCellLayout {
}
self.summaryRect = MasterTimelineDefaultCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle)
currentPoint.y = [self.titleRect, self.summaryRect].maxY()
var y = [self.titleRect, self.summaryRect].maxY()
if y == 0 {
y = iconImageRect.origin.y + iconImageRect.height
// Necessary calculation of either feed name or date since we are working with dynamic font-sizes
let tmp = MasterTimelineDefaultCellLayout.rectForDate(cellData, currentPoint, textAreaWidth)
y -= tmp.height
}
currentPoint.y = y
// Feed Name and Pub Date
self.dateRect = MasterTimelineDefaultCellLayout.rectForDate(cellData, currentPoint, textAreaWidth)