From 1a6e313abbf3bc97004ee726cbad7598b3f68c1f Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Fri, 7 Aug 2020 18:16:04 -0700 Subject: [PATCH] Fix previews --- Development Assets/DevelopmentModels.swift | 28 +--------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/Development Assets/DevelopmentModels.swift b/Development Assets/DevelopmentModels.swift index 0dbe371..40cd93b 100644 --- a/Development Assets/DevelopmentModels.swift +++ b/Development Assets/DevelopmentModels.swift @@ -30,25 +30,12 @@ extension Defaults { static let development: Defaults = { let preferences = Defaults.fresh() - preferences[.recentIdentityID] = devIdentityID + // Do future setup here return preferences }() } -extension MastodonClient { - static func fresh() -> MastodonClient { MastodonClient(configuration: .stubbing) } - - static let development: MastodonClient = { - let client = MastodonClient.fresh() - - client.instanceURL = devInstanceURL - client.accessToken = devAccessToken - - return client - }() -} - extension Account { static let development = try! decoder.decode(Account.self, from: Data(officialAccountJSON.utf8)) } @@ -82,19 +69,6 @@ extension IdentityDatabase { }() } -extension Identity { - static let development: Identity = { - var identity: Identity? - - IdentityDatabase.development.identityObservation(id: devIdentityID) - .assertNoFailure() - .sink(receiveValue: { identity = $0 }) - .store(in: &cancellables) - - return identity! - }() -} - extension AppEnvironment { static func fresh( URLSessionConfiguration: URLSessionConfiguration = .stubbing,