mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-10 23:33:29 +01:00
Replaces PatreonAccount.isFriendZone with ManagedPatron
Rather than store both the current user’s Patreon account and all cached Friend Zone patrons in the same table, we now store Friend Zone patrons in the new ManagedPatron table. This avoids the need to distinguish between the two at runtime.
This commit is contained in:
@@ -38,7 +38,6 @@ public class PatreonAccount: NSManagedObject, Fetchable
|
||||
@NSManaged public var firstName: String?
|
||||
|
||||
@NSManaged public var isPatron: Bool
|
||||
@NSManaged public var isFriendZonePatron: NSNumber?
|
||||
|
||||
private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
|
||||
{
|
||||
@@ -63,16 +62,6 @@ public class PatreonAccount: NSManagedObject, Fetchable
|
||||
self.isPatron = false
|
||||
}
|
||||
}
|
||||
|
||||
public init(patron: Patron, context: NSManagedObjectContext)
|
||||
{
|
||||
super.init(entity: PatreonAccount.entity(), insertInto: context)
|
||||
|
||||
self.identifier = patron.identifier
|
||||
self.name = patron.name
|
||||
self.firstName = nil
|
||||
self.isPatron = (patron.status == .active)
|
||||
}
|
||||
}
|
||||
|
||||
public extension PatreonAccount
|
||||
|
||||
Reference in New Issue
Block a user