- Add CreateLabelUseCase for consistent label creation across app and extension - Implement TagRepository for Share Extension to persist new labels to Core Data - Enhance CoreDataTagManagementView with real-time search functionality - Add automatic tag synchronization on app startup and resume - Improve Core Data context configuration for better extension support - Unify label terminology across UI components (tags -> labels) - Fix label persistence issues in Share Extension - Add immediate Core Data persistence for newly created labels - Bump version to 36
18 lines
416 B
Swift
18 lines
416 B
Swift
import Foundation
|
|
|
|
protocol PCreateLabelUseCase {
|
|
func execute(name: String) async throws
|
|
}
|
|
|
|
class CreateLabelUseCase: PCreateLabelUseCase {
|
|
private let labelsRepository: PLabelsRepository
|
|
|
|
init(labelsRepository: PLabelsRepository) {
|
|
self.labelsRepository = labelsRepository
|
|
}
|
|
|
|
func execute(name: String) async throws {
|
|
try await labelsRepository.saveNewLabel(name: name)
|
|
}
|
|
}
|