Skip to content

Commit 1142472

Browse files
committed
Move updating 'useURLSession' to its own function
1 parent 07f528c commit 1142472

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

WordPress/Classes/System/WordPressAppDelegate.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,7 @@ class WordPressAppDelegate: UIResponder, UIApplicationDelegate {
132132
DDLogInfo("didFinishLaunchingWithOptions state: \(application.applicationState)")
133133

134134
ABTest.start()
135-
136-
if FeatureFlag.useURLSession.enabled {
137-
WordPressComRestApi.useURLSession = true
138-
WordPressOrgXMLRPCApi.useURLSession = true
139-
}
135+
configureWordPressKit()
140136

141137
Media.removeTemporaryData()
142138
NSItemProvider.removeTemporaryData()
@@ -525,6 +521,13 @@ extension WordPressAppDelegate {
525521
AppEnvironment.replaceEnvironment(wordPressComApiBase: url)
526522
}
527523
}
524+
525+
private func configureWordPressKit() {
526+
if FeatureFlag.useURLSession.enabled {
527+
WordPressComRestApi.useURLSession = true
528+
WordPressOrgXMLRPCApi.useURLSession = true
529+
}
530+
}
528531
}
529532

530533
// MARK: - Deep Link Handling

0 commit comments

Comments
 (0)