Fix new cap image count and classifier
This commit is contained in:
parent
228261b5e1
commit
9b9ce63f7c
@ -40,7 +40,7 @@ struct Cap {
|
|||||||
self.id = id
|
self.id = id
|
||||||
self.name = name
|
self.name = name
|
||||||
self.cleanName = name.clean
|
self.cleanName = name.clean
|
||||||
self.imageCount = 1
|
self.imageCount = 0
|
||||||
self.mainImage = 0
|
self.mainImage = 0
|
||||||
self.classifierVersion = classifier
|
self.classifierVersion = classifier
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ final class Database: ObservableObject {
|
|||||||
// MARK: Adding new data
|
// MARK: Adding new data
|
||||||
|
|
||||||
func save(newCap name: String) -> Cap {
|
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
|
caps[cap.id] = cap
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.changedCaps.insert(cap.id)
|
self.changedCaps.insert(cap.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user