Fixes button titles flashing when scrolling into view

This commit is contained in:
Riley Testut
2023-12-08 18:30:30 -06:00
committed by Magesh K
parent 55aa893b21
commit 3391058475
3 changed files with 93 additions and 86 deletions

View File

@@ -566,7 +566,10 @@ extension FeaturedViewController
content.imageProperties.maximumSize = CGSize(width: 26, height: 26)
content.imageProperties.cornerRadius = 13
UIView.performWithoutAnimation {
headerView.titleButton.setTitle(content.text, for: .normal)
headerView.titleButton.layoutIfNeeded()
}
headerView.iconButton.backgroundColor = storeApp.source?.effectiveTintColor?.adjustedForDisplay
headerView.iconButton.setImage(nil, for: .normal)

View File

@@ -254,6 +254,7 @@ extension AppBannerView
buttonAction = .open
}
UIView.performWithoutAnimation {
switch buttonAction
{
case .open:
@@ -330,6 +331,7 @@ extension AppBannerView
// Ensure PillButton is correct size before assigning progress.
self.layoutIfNeeded()
}
if let progress = AppManager.shared.installationProgress(for: app), progress.fractionCompleted < 1.0
{

View File

@@ -226,6 +226,7 @@ private extension SourcesViewController
let numberOfApps = source.apps.filter { StoreApp.visibleAppsPredicate.evaluate(with: $0) }.count
UIView.performWithoutAnimation {
if let error = source.error
{
let image = UIImage(systemName: "exclamationmark")?.withTintColor(.white, renderingMode: .alwaysOriginal)
@@ -252,6 +253,7 @@ private extension SourcesViewController
cell.bannerView.button.addAction(action, for: .primaryActionTriggered)
cell.bannerView.button.removeAction(identifiedBy: .showError, for: .primaryActionTriggered)
}
}
let dateText: String
if let lastUpdatedDate = source.lastUpdatedDate