Remove unused additionalPredicate

This commit is contained in:
shannon 2024-11-15 14:32:47 -05:00
parent 35f1280904
commit 9380ef3361
2 changed files with 2 additions and 7 deletions

View File

@ -22,13 +22,10 @@ public final class SettingFetchedResultController: NSObject {
// output // output
public let settings = CurrentValueSubject<[Setting], Never>([]) public let settings = CurrentValueSubject<[Setting], Never>([])
public init(additionalPredicate: NSPredicate?) { override public init() {
self.fetchedResultsController = { self.fetchedResultsController = {
let fetchRequest = Setting.sortedFetchRequest let fetchRequest = Setting.sortedFetchRequest
fetchRequest.returnsObjectsAsFaults = false fetchRequest.returnsObjectsAsFaults = false
if let additionalPredicate = additionalPredicate {
fetchRequest.predicate = additionalPredicate
}
fetchRequest.fetchBatchSize = 20 fetchRequest.fetchBatchSize = 20
let controller = NSFetchedResultsController( let controller = NSFetchedResultsController(
fetchRequest: fetchRequest, fetchRequest: fetchRequest,

View File

@ -29,9 +29,7 @@ public final class SettingService {
public let currentSetting = CurrentValueSubject<Setting?, Never>(nil) public let currentSetting = CurrentValueSubject<Setting?, Never>(nil)
private init() { private init() {
self.settingFetchedResultController = SettingFetchedResultController( self.settingFetchedResultController = SettingFetchedResultController()
additionalPredicate: nil
)
// create setting (if non-exist) for authenticated users // create setting (if non-exist) for authenticated users
AuthenticationServiceProvider.shared.$mastodonAuthenticationBoxes AuthenticationServiceProvider.shared.$mastodonAuthenticationBoxes