Improve content saving, label editing

This commit is contained in:
Christoph Hagen
2025-05-02 22:11:43 +02:00
parent fea06a93b7
commit 1f4f32c9af
15 changed files with 274 additions and 150 deletions

View File

@ -0,0 +1,27 @@
import Foundation
import Combine
class ChangeObservingItem: ObservableContentItem {
unowned let content: Content
/// A dummy property to force views to update when properties change
@Published
private var changeToggle = false
var cancellables = Set<AnyCancellable>()
init(content: Content) {
self.content = content
observeChanges()
}
// MARK: Change observation
func didChange() {
DispatchQueue.main.async {
self.changeToggle.toggle()
}
}
}