Fixes sideloaded apps disappearing after unlinking Patreon

This commit is contained in:
Riley Testut
2019-09-10 12:32:48 -07:00
parent 839b0b95fc
commit 225bbbe7af
2 changed files with 5 additions and 3 deletions

View File

@@ -90,7 +90,8 @@ extension InstalledApp
} }
else else
{ {
predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [predicate, NSPredicate(format: "%K == NO", #keyPath(InstalledApp.storeApp.isBeta))]) predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [predicate,
NSPredicate(format: "%K == nil OR %K == NO", #keyPath(InstalledApp.storeApp), #keyPath(InstalledApp.storeApp.isBeta))])
} }
var installedApps = InstalledApp.all(satisfying: predicate, var installedApps = InstalledApp.all(satisfying: predicate,
@@ -121,7 +122,8 @@ extension InstalledApp
} }
else else
{ {
predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [predicate, NSPredicate(format: "%K == NO", #keyPath(InstalledApp.storeApp.isBeta))]) predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [predicate,
NSPredicate(format: "%K == nil OR %K == NO", #keyPath(InstalledApp.storeApp), #keyPath(InstalledApp.storeApp.isBeta))])
} }
var installedApps = InstalledApp.all(satisfying: predicate, var installedApps = InstalledApp.all(satisfying: predicate,

View File

@@ -313,7 +313,7 @@ private extension MyAppsViewController
} }
else else
{ {
self.dataSource.predicate = NSPredicate(format: "%K != nil AND %K == NO", #keyPath(InstalledApp.storeApp), #keyPath(InstalledApp.storeApp.isBeta)) self.dataSource.predicate = NSPredicate(format: "%K == nil OR %K == NO", #keyPath(InstalledApp.storeApp), #keyPath(InstalledApp.storeApp.isBeta))
} }
} }
} }