chore: update naming for StatusFetchedResultsController

This commit is contained in:
CMK 2021-04-01 14:54:15 +08:00
parent 499ddeb169
commit efbb32648c
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ final class StatusFetchedResultsController: NSObject {
let statusIDs = CurrentValueSubject<[Mastodon.Entity.Status.ID], Never>([]) let statusIDs = CurrentValueSubject<[Mastodon.Entity.Status.ID], Never>([])
// output // output
let items = CurrentValueSubject<[NSManagedObjectID], Never>([]) let objectIDs = CurrentValueSubject<[NSManagedObjectID], Never>([])
init(managedObjectContext: NSManagedObjectContext, domain: String?, additionalTweetPredicate: NSPredicate) { init(managedObjectContext: NSManagedObjectContext, domain: String?, additionalTweetPredicate: NSPredicate) {
self.domain.value = domain ?? "" self.domain.value = domain ?? ""
@ -81,6 +81,6 @@ extension StatusFetchedResultsController: NSFetchedResultsControllerDelegate {
} }
.sorted { $0.0 < $1.0 } .sorted { $0.0 < $1.0 }
.map { $0.1.objectID } .map { $0.1.objectID }
self.items.value = items self.objectIDs.value = items
} }
} }

View File

@ -60,7 +60,7 @@ class UserTimelineViewModel: NSObject {
.store(in: &disposeBag) .store(in: &disposeBag)
statusFetchedResultsController.items statusFetchedResultsController.objectIDs
.receive(on: DispatchQueue.main) .receive(on: DispatchQueue.main)
.sink { [weak self] objectIDs in .sink { [weak self] objectIDs in
guard let self = self else { return } guard let self = self else { return }