From fc7ebd65f8b93180865ba2b80da3be7c8c46932a Mon Sep 17 00:00:00 2001 From: shannon Date: Mon, 2 Dec 2024 14:43:43 -0500 Subject: [PATCH] Refactor: Remove unused DocumentStore --- MastodonSDK/Sources/MastodonCore/AppContext.swift | 9 --------- .../Sources/MastodonCore/DocumentStore.swift | 15 --------------- 2 files changed, 24 deletions(-) delete mode 100644 MastodonSDK/Sources/MastodonCore/DocumentStore.swift diff --git a/MastodonSDK/Sources/MastodonCore/AppContext.swift b/MastodonSDK/Sources/MastodonCore/AppContext.swift index dbe8c74edb..330f2a4345 100644 --- a/MastodonSDK/Sources/MastodonCore/AppContext.swift +++ b/MastodonSDK/Sources/MastodonCore/AppContext.swift @@ -18,9 +18,6 @@ public class AppContext: ObservableObject { public let placeholderImageCacheService = PlaceholderImageCacheService() public let blurhashImageCacheService = BlurhashImageCacheService.shared - - public let documentStore: DocumentStore - private var documentStoreSubscription: AnyCancellable! let overrideTraitCollection = CurrentValueSubject(nil) let timestampUpdatePublisher = Timer.publish(every: 1.0, on: .main, in: .common) @@ -29,12 +26,6 @@ public class AppContext: ObservableObject { .eraseToAnyPublisher() private init() { - documentStore = DocumentStore() - documentStoreSubscription = documentStore.objectWillChange - .receive(on: DispatchQueue.main) - .sink { [unowned self] in - self.objectWillChange.send() - } } } diff --git a/MastodonSDK/Sources/MastodonCore/DocumentStore.swift b/MastodonSDK/Sources/MastodonCore/DocumentStore.swift deleted file mode 100644 index 29a3d4f944..0000000000 --- a/MastodonSDK/Sources/MastodonCore/DocumentStore.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// DocumentStore.swift -// Mastodon -// -// Created by Cirno MainasuK on 2021-1-27. -// - -import UIKit -import Combine -import MastodonSDK - -public class DocumentStore: ObservableObject { - public let appStartUpTimestamp = Date() - public var defaultRevealStatusDict: [Mastodon.Entity.Status.ID: Bool] = [:] -}