diff --git a/Common/Collection View/GameCollectionViewDataSource.swift b/Common/Collection View/GameCollectionViewDataSource.swift index 06406d6..b96ea2c 100644 --- a/Common/Collection View/GameCollectionViewDataSource.swift +++ b/Common/Collection View/GameCollectionViewDataSource.swift @@ -62,9 +62,9 @@ class GameCollectionViewDataSource: NSObject fetchRequest.predicate = CompoundPredicate(orPredicateWithSubpredicates: predicates) } - fetchRequest.sortDescriptors = [SortDescriptor(key: Game.Attributes.typeIdentifier.rawValue, ascending: true), SortDescriptor(key: Game.Attributes.name.rawValue, ascending: true)] + fetchRequest.sortDescriptors = [SortDescriptor(key: Game.Attributes.type.rawValue, ascending: true), SortDescriptor(key: Game.Attributes.name.rawValue, ascending: true)] - self.fetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: DatabaseManager.sharedManager.managedObjectContext, sectionNameKeyPath: Game.Attributes.typeIdentifier.rawValue, cacheName: nil) + self.fetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: DatabaseManager.sharedManager.managedObjectContext, sectionNameKeyPath: Game.Attributes.type.rawValue, cacheName: nil) self.fetchedResultsController.delegate = previousDelegate self.update() diff --git a/Common/Database/Model/Game.swift b/Common/Database/Model/Game.swift index ca06348..ee5b7e3 100644 --- a/Common/Database/Model/Game.swift +++ b/Common/Database/Model/Game.swift @@ -21,7 +21,7 @@ extension Game case filename case identifier case name - case typeIdentifier + case type case gameCollections case saveStates diff --git a/Common/Database/Model/SaveState.swift b/Common/Database/Model/SaveState.swift index 46f3f7b..eb56994 100644 --- a/Common/Database/Model/SaveState.swift +++ b/Common/Database/Model/SaveState.swift @@ -21,6 +21,7 @@ extension SaveState case creationDate case modifiedDate case type + case gameType case game case previewGame