Fix new cap image count and classifier

This commit is contained in:
Christoph Hagen 2022-06-24 12:06:10 +02:00
parent 228261b5e1
commit 9b9ce63f7c
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ struct Cap {
self.id = id
self.name = name
self.cleanName = name.clean
self.imageCount = 1
self.imageCount = 0
self.mainImage = 0
self.classifierVersion = classifier
}

View File

@ -338,7 +338,7 @@ final class Database: ObservableObject {
// MARK: Adding new data
func save(newCap name: String) -> Cap {
let cap = Cap(id: nextCapId, name: name, classifier: serverClassifierVersion)
let cap = Cap(id: nextCapId, name: name, classifier: nil)
caps[cap.id] = cap
DispatchQueue.main.async {
self.changedCaps.insert(cap.id)