From 4d3f77b83b71a3af6cfdf71e1d95cb3e1bf4c8e2 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 31 Mar 2026 10:17:40 -0700 Subject: [PATCH] Highlight the entire timeline row on iOS 17/18. --- .../MainTimelineCollectionViewCell.swift | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift b/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift index fb19938bc..46087d20a 100644 --- a/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift +++ b/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift @@ -324,17 +324,20 @@ class MainTimelineCollectionViewCell: UICollectionViewCell { } else { backgroundConfig = UIBackgroundConfiguration.listGroupedCell().updated(for: state) } - backgroundConfig.cornerRadius = 20 - - backgroundConfig.edgesAddingLayoutMarginsToBackgroundInsets = [.leading, .trailing] - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -8, bottom: 0, trailing: -8) - } else { - if !isPreview { - backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -12, bottom: 0, trailing: -12) + if #available(iOS 26, *) { + backgroundConfig.cornerRadius = 20 + backgroundConfig.edgesAddingLayoutMarginsToBackgroundInsets = [.leading, .trailing] + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -8, bottom: 0, trailing: -8) } else { - backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -16, bottom: 0, trailing: -16) + if !isPreview { + backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -12, bottom: 0, trailing: -12) + } else { + backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -16, bottom: 0, trailing: -16) + } } + } else { + backgroundConfig.cornerRadius = 0 } let isActive = state.isSwiped || state.isSelected