Skip to content

Commit

Permalink
Remove extra add presenter call
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayterDev committed Sep 19, 2024
1 parent d77035f commit f44c828
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10926,8 +10926,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 196.2.0;
kind = revision;
revision = b4903edbd389927d67a3b843b76fec5bdf82febf;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "32a2ec64385543ccfbaaafbfe9545543a2c06aac",
"version" : "196.2.0"
"revision" : "b4903edbd389927d67a3b843b76fec5bdf82febf"
}
},
{
Expand Down
15 changes: 2 additions & 13 deletions DuckDuckGo/Configuration/ConfigurationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ final class ConfigurationManager: DefaultConfigurationManager {
store: ConfigurationStoring = AppDependencyProvider.shared.configurationStore,
defaults: KeyValueStoring = UserDefaults(suiteName: "\(Global.groupIdPrefix).app-configuration") ?? UserDefaults()) {
super.init(fetcher: fetcher, store: store, defaults: defaults)
addPresenter()
subscribeToLifecycleNotifications()
}

deinit {
removePresenter()
removeLifecycleNotifications()
removePresenter()
}

@discardableResult
Expand Down Expand Up @@ -135,7 +134,7 @@ final class ConfigurationManager: DefaultConfigurationManager {

return didFetchAnyTrackerBlockingDependencies
}

private func updateTrackerBlockingDependencies() {
ContentBlocking.shared.privacyConfigurationManager.reload(etag: store.loadEtag(for: .privacyConfiguration),
data: store.loadData(for: .privacyConfiguration))
Expand Down Expand Up @@ -215,14 +214,4 @@ extension ConfigurationManager {
NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
}

@objc
func addPresenter() {
NSFileCoordinator.addFilePresenter(self)
}

@objc
func removePresenter() {
NSFileCoordinator.removeFilePresenter(self)
}
}

0 comments on commit f44c828

Please sign in to comment.