From aa1ed04bce75ee108a9bb2ae1e0f0ebd250c6983 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Thu, 15 Feb 2024 16:06:09 -0600 Subject: [PATCH] =?UTF-8?q?Fixes=20not=20showing=20=E2=80=9Cmore=20updates?= =?UTF-8?q?=E2=80=9D=20button=20when=20there=20are=20more=20than=202=20upd?= =?UTF-8?q?ates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AltStore/My Apps/MyAppsViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AltStore/My Apps/MyAppsViewController.swift b/AltStore/My Apps/MyAppsViewController.swift index c6477b2c..d07bb2a1 100644 --- a/AltStore/My Apps/MyAppsViewController.swift +++ b/AltStore/My Apps/MyAppsViewController.swift @@ -1662,7 +1662,7 @@ extension MyAppsViewController headerView.button.titleLabel?.transform = CGAffineTransform.identity.rotated(by: .pi) } - headerView.isHidden = (self.updatesDataSource.itemCount <= 2) + headerView.isHidden = (self.updatesDataSource.fetchedResultsController.fetchedObjects?.count ?? 0 <= maximumCollapsedUpdatesCount) headerView.button.layoutIfNeeded() } @@ -2041,7 +2041,7 @@ extension MyAppsViewController: UICollectionViewDelegateFlowLayout { case .noUpdates: return .zero case .updates: - let height: CGFloat = self.updatesDataSource.itemCount > maximumCollapsedUpdatesCount ? 26 : 0 + let height: CGFloat = (self.updatesDataSource.fetchedResultsController.fetchedObjects?.count ?? 0 > maximumCollapsedUpdatesCount) ? 26 : 0 return CGSize(width: collectionView.bounds.width, height: height) case .activeApps: return CGSize(width: collectionView.bounds.width, height: 29)