diff --git a/Tusker/CoreData/MastodonCachePersistentStore.swift b/Tusker/CoreData/MastodonCachePersistentStore.swift index 419c495536..9b491112a3 100644 --- a/Tusker/CoreData/MastodonCachePersistentStore.swift +++ b/Tusker/CoreData/MastodonCachePersistentStore.swift @@ -18,7 +18,11 @@ class MastodonCachePersistentStore: NSPersistentContainer { return NSManagedObjectModel(contentsOf: url)! }() - private(set) lazy var backgroundContext = newBackgroundContext() + private(set) lazy var backgroundContext: NSManagedObjectContext = { + let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType) + context.parent = self.viewContext + return context + }() let statusSubject = PassthroughSubject() let accountSubject = PassthroughSubject()