Highlight the entire timeline row on iOS 17/18.

This commit is contained in:
Brent Simmons committed 2026-03-31 10:17:40 -07:00
1 parent fd5c2dcbc5
commit 4d3f77b83b
1 file changed
+12 -9
@@ -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