From 2fa43fb1e91af0ed4873c7c30aed309fab121069 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 29 Oct 2019 19:29:37 -0500 Subject: [PATCH] Change disclosure triangle so that it interacts with vibrancy the same way that the unread count indicator does --- iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift index bf37a3233..1e1427f95 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift @@ -178,6 +178,7 @@ private extension MasterFeedTableViewCell { disclosureButton = NonIntrinsicButton(type: .roundedRect) disclosureButton!.addTarget(self, action: #selector(buttonPressed(_:)), for: UIControl.Event.touchUpInside) disclosureButton?.setImage(AppAssets.disclosureImage, for: .normal) + disclosureButton?.tintColor = AppAssets.controlBackgroundColor disclosureButton?.imageView?.contentMode = .center disclosureButton?.imageView?.clipsToBounds = false addSubviewAtInit(disclosureButton!) @@ -198,14 +199,10 @@ private extension MasterFeedTableViewCell { } func updateVibrancy(animated: Bool) { - let faviconTintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : AppAssets.secondaryAccentColor - let disclosureTintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : AppAssets.controlBackgroundColor - + let avatarTintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : AppAssets.secondaryAccentColor let duration = animated ? 0.6 : 0.0 - UIView.animate(withDuration: duration) { - self.disclosureButton?.tintColor = disclosureTintColor - self.avatarView.tintColor = faviconTintColor + self.avatarView.tintColor = avatarTintColor } }