chore: update naming for StatusFetchedResultsController
This commit is contained in:
parent
499ddeb169
commit
efbb32648c
|
@ -23,7 +23,7 @@ final class StatusFetchedResultsController: NSObject {
|
|||
let statusIDs = CurrentValueSubject<[Mastodon.Entity.Status.ID], Never>([])
|
||||
|
||||
// output
|
||||
let items = CurrentValueSubject<[NSManagedObjectID], Never>([])
|
||||
let objectIDs = CurrentValueSubject<[NSManagedObjectID], Never>([])
|
||||
|
||||
init(managedObjectContext: NSManagedObjectContext, domain: String?, additionalTweetPredicate: NSPredicate) {
|
||||
self.domain.value = domain ?? ""
|
||||
|
@ -81,6 +81,6 @@ extension StatusFetchedResultsController: NSFetchedResultsControllerDelegate {
|
|||
}
|
||||
.sorted { $0.0 < $1.0 }
|
||||
.map { $0.1.objectID }
|
||||
self.items.value = items
|
||||
self.objectIDs.value = items
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ class UserTimelineViewModel: NSObject {
|
|||
.store(in: &disposeBag)
|
||||
|
||||
|
||||
statusFetchedResultsController.items
|
||||
statusFetchedResultsController.objectIDs
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { [weak self] objectIDs in
|
||||
guard let self = self else { return }
|
||||
|
|
Loading…
Reference in New Issue