From 37e54f40b17088f8601e9382a129f108f75ff3d8 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 8 Nov 2026 11:04:10 -0800 Subject: [PATCH] Put date above thumbnail when small thumbnails is on and feed-name-and-date-on-first-line is on (on iOS). --- iOS/MainTimeline/Cell/MainTimelineCellLayout.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/iOS/MainTimeline/Cell/MainTimelineCellLayout.swift b/iOS/MainTimeline/Cell/MainTimelineCellLayout.swift index 69c5bc916..a63a03987 100644 --- a/iOS/MainTimeline/Cell/MainTimelineCellLayout.swift +++ b/iOS/MainTimeline/Cell/MainTimelineCellLayout.swift @@ -168,12 +168,14 @@ struct MainTimelineDefaultCellLayout: MainTimelineCellLayout { var feedNameRect = CGRect.zero var dateRect = CGRect.zero if cellData.feedNameAndDateAboveTitle { - (feedNameRect, dateRect) = Self.rectsForFeedNameAndDate(cellData, currentPoint, textAreaWidth) + // Spans the small thumbnail too, which lines up with the title. + (feedNameRect, dateRect) = Self.rectsForFeedNameAndDate(cellData, currentPoint, rightEdge - currentPoint.x) currentPoint.y = [feedNameRect, dateRect].maxY() + Self.feedNameAndDateBottomMargin // Centered on the feed name and date line, which is the first line. unreadIndicatorRect.origin.y = floor(dateRect.midY - (unreadIndicatorRect.height / 2.0)) starRect.origin.y = floor(dateRect.midY - (starRect.height / 2.0)) } + let titleOriginY = currentPoint.y let (titleRect, numberOfLinesForTitle) = Self.rectForTitle(cellData, currentPoint, textAreaWidth) self.titleRect = titleRect @@ -202,8 +204,8 @@ struct MainTimelineDefaultCellLayout: MainTimelineCellLayout { let textMaxY = [self.titleRect, self.summaryRect, self.feedNameRect, self.dateRect].maxY() if showsSmallThumbnail { - // Top right. The cell grows if needed to fit it. - self.thumbnailRect = CGRect(x: rightEdge - Self.thumbnailDimension, y: Self.cellPadding.top, width: Self.thumbnailDimension, height: Self.thumbnailDimension) + // Right side, top aligned with the title. The cell grows if needed to fit it. + self.thumbnailRect = CGRect(x: rightEdge - Self.thumbnailDimension, y: titleOriginY, width: Self.thumbnailDimension, height: Self.thumbnailDimension) } else if cellData.showThumbnail && cellData.thumbnailsDisplay == .large { // Below the text and icon, from the icon’s left edge (or the text’s) to the right padding. let originX = cellData.showIcon ? self.iconImageRect.minX : currentPoint.x