Fix id of Items, saving

This commit is contained in:
Christoph Hagen
2025-06-11 08:19:44 +02:00
parent 5970ce2e9f
commit 1d0eba9d78
64 changed files with 233 additions and 217 deletions

View File

@ -37,11 +37,11 @@ class Tag: Item, LocalizedItem {
@discardableResult
func update(id newId: String) -> Bool {
guard content.storage.move(tag: id, to: newId) else {
print("Failed to move files of tag \(id)")
guard content.storage.move(tag: identifier, to: newId) else {
print("Failed to move files of tag \(identifier)")
return false
}
id = newId
identifier = newId
return true
}
@ -106,6 +106,6 @@ extension Tag: StorageItem {
}
func saveToDisk(_ data: Data) -> Bool {
content.storage.save(tag: data, for: id)
content.storage.save(tag: data, for: identifier)
}
}