// // StatusFetchedResultsController.swift // Mastodon // // Created by MainasuK Cirno on 2021-3-30. // import UIKit import Combine import CoreData import CoreDataStack import MastodonSDK public final class StatusFetchedResultsController { @MainActor @Published public private(set) var records: [MastodonStatus] = [] @MainActor public init(records: [MastodonStatus] = []) { self.records = records } @MainActor public func reset() { records = [] } @MainActor public func setRecords(_ records: [MastodonStatus]) { self.records = records } @MainActor public func appendRecords(_ records: [MastodonStatus]) { self.records += records } }