From 77a119f2928726f1a098e5d8d1a95abeee51a147 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 5 Nov 2019 18:08:58 -0800 Subject: [PATCH] Fixes incorrect UpdateCollectionViewCell dimmed tint color --- AltStore/My Apps/UpdateCollectionViewCell.swift | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/AltStore/My Apps/UpdateCollectionViewCell.swift b/AltStore/My Apps/UpdateCollectionViewCell.swift index d5a7974e..beecafdd 100644 --- a/AltStore/My Apps/UpdateCollectionViewCell.swift +++ b/AltStore/My Apps/UpdateCollectionViewCell.swift @@ -30,6 +30,8 @@ extension UpdateCollectionViewCell @IBOutlet var versionDescriptionTextView: CollapsingTextView! @IBOutlet private var blurView: UIVisualEffectView! + + private var originalTintColor: UIColor? override func awakeFromNib() { @@ -52,6 +54,11 @@ extension UpdateCollectionViewCell { super.tintColorDidChange() + if self.tintAdjustmentMode != .dimmed + { + self.originalTintColor = self.tintColor + } + self.update() } @@ -91,11 +98,9 @@ private extension UpdateCollectionViewCell case .expanded: self.versionDescriptionTextView.isCollapsed = false } - self.versionDescriptionTitleLabel.textColor = self.tintColor - self.blurView.backgroundColor = self.tintColor - - self.bannerView.button.tintColor = self.tintColor - self.bannerView.button.progressTintColor = self.tintColor + self.versionDescriptionTitleLabel.textColor = self.originalTintColor ?? self.tintColor + self.blurView.backgroundColor = self.originalTintColor ?? self.tintColor + self.bannerView.button.progressTintColor = self.originalTintColor ?? self.tintColor self.setNeedsLayout() self.layoutIfNeeded()