From e3dfca91bfe6361ce5ba6f692e288b5028c0185e Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 6 Jul 2026 20:02:29 -0700 Subject: [PATCH] Use standard selection colors in timeline and sidebar. --- .../MainFeedCollectionViewCell.swift | 7 ---- .../MainFeedCollectionViewFolderCell.swift | 5 --- iOS/MainTimeline/Cell/MainTimelineCell.swift | 33 +++++++++---------- 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewCell.swift b/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewCell.swift index 1f60674f8..0f4d0922b 100644 --- a/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewCell.swift +++ b/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewCell.swift @@ -100,13 +100,6 @@ final class MainFeedCollectionViewCell: UICollectionViewCell { weight: .semibold) unreadCountLabel.textColor = Assets.Colors.primaryAccent unreadCountLabel.font = UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .body).pointSize, weight: .semibold) - case (true, .phone): - backgroundConfig.backgroundColor = Assets.Colors.primaryAccent - feedTitle.textColor = .white - unreadCountLabel.textColor = .white - if feedTitle.text == "All Unread" { - faviconView.tintColor = .white - } default: feedTitle.textColor = .label feedTitle.font = UIFont.preferredFont(forTextStyle: .body) diff --git a/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewFolderCell.swift b/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewFolderCell.swift index 5938c8592..a69b0efad 100644 --- a/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewFolderCell.swift +++ b/iOS/MainFeed/Collection View Cells/MainFeedCollectionViewFolderCell.swift @@ -153,11 +153,6 @@ class MainFeedCollectionViewFolderCell: UICollectionViewCell { folderTitle.font = UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .body).pointSize, weight: .semibold) unreadCountLabel.textColor = Assets.Colors.primaryAccent unreadCountLabel.font = UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .body).pointSize, weight: .semibold) - case (true, .phone): - backgroundConfig.backgroundColor = Assets.Colors.primaryAccent - folderTitle.textColor = .white - unreadCountLabel.textColor = .white - faviconView.tintColor = .white default: folderTitle.textColor = .label faviconView.tintColor = Assets.Colors.primaryAccent diff --git a/iOS/MainTimeline/Cell/MainTimelineCell.swift b/iOS/MainTimeline/Cell/MainTimelineCell.swift index 12c38b695..f200f225d 100644 --- a/iOS/MainTimeline/Cell/MainTimelineCell.swift +++ b/iOS/MainTimeline/Cell/MainTimelineCell.swift @@ -89,11 +89,10 @@ final class MainTimelineCell: UICollectionViewCell { backgroundConfig.cornerRadius = 0 } - if state.isSelected { - backgroundConfig.backgroundColor = Assets.Colors.primaryAccent - } else if state.isSwiped { + // Selected cells keep the standard system selection color from updated(for: state). + if state.isSwiped { backgroundConfig.backgroundColor = .secondarySystemFill - } else { + } else if !state.isSelected { backgroundConfig.backgroundColor = .clear } @@ -106,10 +105,8 @@ final class MainTimelineCell: UICollectionViewCell { topSeparator.alpha = (isActive || isPreview) ? 0.0 : 1.0 - // White foreground is only for the selected state (blue accent background). - // The swiped state uses a subtle gray fill, so it keeps normal label colors. - updateColors(active: state.isSelected) - updateIndicatorView(active: state.isSelected) + updateColors() + updateIndicatorView() } func setIconImage(_ image: IconImage) { @@ -198,31 +195,31 @@ private extension MainTimelineCell { iconView.isHidden = true } - updateColors(active: configurationState.isSelected) - updateIndicatorView(active: configurationState.isSelected) + updateColors() + updateIndicatorView() updateAccessibilityLabel() setNeedsLayout() } - func updateColors(active: Bool) { - titleView.textColor = active ? .white : .label - summaryView.textColor = active ? .white : (cellData.title.isEmpty ? .label : .secondaryLabel) - dateView.textColor = active ? .white : .secondaryLabel - feedNameView.textColor = active ? .white : .secondaryLabel + func updateColors() { + titleView.textColor = .label + summaryView.textColor = cellData.title.isEmpty ? .label : .secondaryLabel + dateView.textColor = .secondaryLabel + feedNameView.textColor = .secondaryLabel } - func updateIndicatorView(active: Bool) { + func updateIndicatorView() { guard cellData != nil else { indicatorView.isHidden = true return } if cellData.starred { indicatorView.iconImage = Assets.Images.starredFeed - indicatorView.tintColor = active ? .white : Assets.Colors.star + indicatorView.tintColor = Assets.Colors.star indicatorView.isHidden = false } else if !cellData.read { indicatorView.iconImage = Assets.Images.unreadCellIndicator - indicatorView.tintColor = active ? .white : Assets.Colors.secondaryAccent + indicatorView.tintColor = Assets.Colors.secondaryAccent indicatorView.isHidden = false } else { indicatorView.isHidden = true