Fix bug where folders on iOS weren’t grayscale when the grayscale icon setting is on.

This commit is contained in:
Brent Simmons committed 2026-11-10 20:50:24 -08:00
1 parent fcfd7d207a
commit 1875a0f9e7
2 files changed
+9 -4

No files matched your search

+1 -1
View File
@@ -105,7 +105,7 @@ struct Assets {
static let trash = RSImage(symbol: "trash")!
static let searchFeed = IconImage(RSImage(symbol: "magnifyingglass")!, isSymbol: true)
static let mainFolder = IconImage(folder, isSymbol: true, isBackgroundSuppressed: true, preferredColor: Assets.Colors.secondaryAccent)
static let mainFolder = IconImage(folder, isSymbol: true, isBackgroundSuppressed: true, preferredColor: Assets.Colors.primaryAccent)
static let todayFeed = IconImage(RSImage(symbol: "sun.max.fill")!, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange)
static let unreadFeed = IconImage(RSImage(symbol: "largecircle.fill.circle")!, isSymbol: true, isBackgroundSuppressed: true, preferredColor: Assets.Colors.secondaryAccent)
static var timelineStar: RSImage {
@@ -60,10 +60,15 @@ class MainFeedCollectionViewFolderCell: UICollectionViewCell {
AppDefaults.unreadCountDisplay.text(for: unreadCount)
}
/// Gray when grayscale icons are on.
private var iconTintColor: UIColor {
iconImage?.preferredColor ?? Assets.Colors.primaryAccent
}
var iconImage: IconImage? {
didSet {
faviconView.iconImage = iconImage
faviconView.tintColor = iconImage?.preferredColor ?? Assets.Colors.secondaryAccent
faviconView.tintColor = iconTintColor
}
}
@@ -181,11 +186,11 @@ 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)
faviconView.tintColor = Assets.Colors.primaryAccent
faviconView.tintColor = iconTintColor
disclosureButton.configuration?.baseForegroundColor = .label
default:
folderTitle.textColor = .label
faviconView.tintColor = Assets.Colors.primaryAccent
faviconView.tintColor = iconTintColor
folderTitle.font = UIFont.preferredFont(forTextStyle: .body)
unreadCountLabel.textColor = .secondaryLabel
unreadCountLabel.font = UIFont.preferredFont(forTextStyle: .body)