Fixes always showing non-featured apps last in FeaturedViewController

This commit is contained in:
Riley Testut
2023-12-08 19:18:50 -06:00
committed by Magesh K
parent 9b1d65b571
commit fec02cd80a
2 changed files with 40 additions and 21 deletions

View File

@@ -348,11 +348,6 @@ private extension FeaturedViewController
// Instead, sort by StoreApp.installedApp.storeApp.source.sourceIdentifier, which will be either nil OR source ID.
NSSortDescriptor(keyPath: \StoreApp.installedApp?.storeApp?.sourceIdentifier, ascending: true),
// Show featured apps first.
// Sorting by StoreApp.featuringSource crashes because Source does not respond to compare:
// Instead, sort by StoreApp.featuringSource.identifier, which will be either nil OR source ID.
NSSortDescriptor(keyPath: \StoreApp.featuringSource?.identifier, ascending: false),
// Randomize order within sections.
NSSortDescriptor(keyPath: \StoreApp.featuredSortID, ascending: true),