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
public let settings = CurrentValueSubject<[Setting], Never>([])
public init(additionalPredicate: NSPredicate?) {
override public init() {
self.fetchedResultsController = {
let fetchRequest = Setting.sortedFetchRequest
fetchRequest.returnsObjectsAsFaults = false
if let additionalPredicate = additionalPredicate {
fetchRequest.predicate = additionalPredicate
}
fetchRequest.fetchBatchSize = 20
let controller = NSFetchedResultsController(
fetchRequest: fetchRequest,

View File

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