2023-01-01 18:13:36 +01:00
|
|
|
//
|
|
|
|
// https://mczachurski.dev
|
|
|
|
// Copyright © 2023 Marcin Czachurski and the repository contributors.
|
2023-03-28 10:35:38 +02:00
|
|
|
// Licensed under the Apache License 2.0.
|
2023-01-01 18:13:36 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2023-01-02 08:11:38 +01:00
|
|
|
import CoreData
|
2023-01-01 18:13:36 +01:00
|
|
|
|
|
|
|
class AttachmentDataHandler {
|
2023-01-05 11:55:20 +01:00
|
|
|
public static let shared = AttachmentDataHandler()
|
|
|
|
private init() { }
|
2023-04-01 12:10:59 +02:00
|
|
|
|
2023-01-02 08:11:38 +01:00
|
|
|
func createAttachmnentDataEntity(viewContext: NSManagedObjectContext? = nil) -> AttachmentData {
|
|
|
|
let context = viewContext ?? CoreDataHandler.shared.container.viewContext
|
2023-01-01 18:13:36 +01:00
|
|
|
return AttachmentData(context: context)
|
|
|
|
}
|
|
|
|
}
|