From 9b9ce63f7c9c8a7cd385963a425450a6a9996fa7 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Fri, 24 Jun 2022 12:06:10 +0200 Subject: [PATCH] Fix new cap image count and classifier --- Caps/Data/Cap.swift | 2 +- Caps/Data/Database.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Caps/Data/Cap.swift b/Caps/Data/Cap.swift index 0145399..6e0fdbe 100644 --- a/Caps/Data/Cap.swift +++ b/Caps/Data/Cap.swift @@ -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 } diff --git a/Caps/Data/Database.swift b/Caps/Data/Database.swift index 4883695..45e4bbc 100644 --- a/Caps/Data/Database.swift +++ b/Caps/Data/Database.swift @@ -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)