From 9380ef33617cac43dc0870d4dedd61e4658f7eb2 Mon Sep 17 00:00:00 2001 From: shannon Date: Fri, 15 Nov 2024 14:32:47 -0500 Subject: [PATCH] Remove unused additionalPredicate --- .../SettingFetchedResultController.swift | 5 +---- .../Sources/MastodonCore/Service/SettingService.swift | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/MastodonSDK/Sources/MastodonCore/FetchedResultsController/SettingFetchedResultController.swift b/MastodonSDK/Sources/MastodonCore/FetchedResultsController/SettingFetchedResultController.swift index de6a3f468..646c2651a 100644 --- a/MastodonSDK/Sources/MastodonCore/FetchedResultsController/SettingFetchedResultController.swift +++ b/MastodonSDK/Sources/MastodonCore/FetchedResultsController/SettingFetchedResultController.swift @@ -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, diff --git a/MastodonSDK/Sources/MastodonCore/Service/SettingService.swift b/MastodonSDK/Sources/MastodonCore/Service/SettingService.swift index d9206e5bf..276a8c04c 100644 --- a/MastodonSDK/Sources/MastodonCore/Service/SettingService.swift +++ b/MastodonSDK/Sources/MastodonCore/Service/SettingService.swift @@ -29,9 +29,7 @@ public final class SettingService { public let currentSetting = CurrentValueSubject(nil) private init() { - self.settingFetchedResultController = SettingFetchedResultController( - additionalPredicate: nil - ) + self.settingFetchedResultController = SettingFetchedResultController() // create setting (if non-exist) for authenticated users AuthenticationServiceProvider.shared.$mastodonAuthenticationBoxes