From d4d6201ff0bec5dd59270a8454a8f192c7a12103 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Fri, 15 Apr 2022 21:13:36 -0400 Subject: [PATCH] More DI. --- Clocker/Overall App/ConfigExport.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Clocker/Overall App/ConfigExport.swift b/Clocker/Overall App/ConfigExport.swift index b757eea..482ec5f 100644 --- a/Clocker/Overall App/ConfigExport.swift +++ b/Clocker/Overall App/ConfigExport.swift @@ -4,7 +4,7 @@ import CoreModelKit import Foundation struct ConfigExport { - private func generateJSONFromDefaults() { + private func generateJSON(from store: DataStore) { let selectedKeys: Set = Set([ CLShowOnboardingFlow, CLSelectedTimeZoneFormatKey, @@ -40,7 +40,7 @@ struct ConfigExport { } do { - let decodeJSON: [[String: Any]] = DataStore.shared().timezones().compactMap { data -> [String: Any]? in + let decodeJSON: [[String: Any]] = store.timezones().compactMap { data -> [String: Any]? in guard let customObject = TimezoneData.customObject(from: data) else { return nil } let timezoneDictionary: [String: Any] = [ "Name": customObject.formattedAddress ?? "",