From 7059cc913ba9d1efee10a1429230b0d1581daee6 Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 11 Nov 2024 15:00:28 +0100 Subject: [PATCH] cleanup --- LeStorage/StoreCenter.swift | 1 - LeStorage/StoredCollection+Sync.swift | 4 ++-- LeStorage/StoredSingleton.swift | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/LeStorage/StoreCenter.swift b/LeStorage/StoreCenter.swift index 0b3859d..6e4b77a 100644 --- a/LeStorage/StoreCenter.swift +++ b/LeStorage/StoreCenter.swift @@ -508,7 +508,6 @@ public class StoreCenter { func synchronizationDelete(id: String, model: String, storeId: String?) { - DispatchQueue.main.async { do { let type = try StoreCenter.classFromName(model) diff --git a/LeStorage/StoredCollection+Sync.swift b/LeStorage/StoredCollection+Sync.swift index 7081c13..c3e85a2 100644 --- a/LeStorage/StoredCollection+Sync.swift +++ b/LeStorage/StoredCollection+Sync.swift @@ -104,8 +104,8 @@ extension StoredCollection: SomeSyncedCollection where T : SyncedStorable { case is Int64.Type: return Formatter.number.number(from: id)?.int64Value as? T.ID default: - print("ID is neither String nor Int") - return nil + fatalError("ID is neither String nor Int") +// return nil } } diff --git a/LeStorage/StoredSingleton.swift b/LeStorage/StoredSingleton.swift index 77ccad0..672020e 100644 --- a/LeStorage/StoredSingleton.swift +++ b/LeStorage/StoredSingleton.swift @@ -33,4 +33,8 @@ public class StoredSingleton: StoredCollection { fatalError("method unavailable for StoredSingleton, use update") } + func addOrUpdateIfNewer(_ instance: T) { + fatalError("method unavailable for StoredSingleton, use update") + } + }