Skip to content

Commit 73e8770

Browse files
Add: trigger site creation overlay for creating a site from the site list
1 parent 1ed6976 commit 73e8770

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
extension BlogListViewController {
22
@objc
33
func launchSiteCreation() {
4-
let wizardLauncher = SiteCreationWizardLauncher()
5-
guard let wizard = wizardLauncher.ui else {
6-
return
4+
JetpackFeaturesRemovalCoordinator.presentSiteCreationOverlayIfNeeded(in: self) {
5+
guard JetpackFeaturesRemovalCoordinator.siteCreationPhase() != .two else {
6+
return
7+
}
8+
9+
// Display site creation flow if not in phase two
10+
let wizardLauncher = SiteCreationWizardLauncher()
11+
guard let wizard = wizardLauncher.ui else {
12+
return
13+
}
14+
self.present(wizard, animated: true)
15+
WPAnalytics.track(.enhancedSiteCreationAccessed, withProperties: ["source": "my_sites"])
716
}
8-
present(wizard, animated: true)
9-
WPAnalytics.track(.enhancedSiteCreationAccessed, withProperties: ["source": "my_sites"])
1017
}
1118
}

0 commit comments

Comments
 (0)