Skip to content

Commit d664c9f

Browse files
Add: trigger site creation overlay for creating a site after sign up
1 parent 9fc54c4 commit d664c9f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController.swift

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,12 +696,19 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
696696
}
697697

698698
func launchSiteCreation(source: String) {
699-
let wizardLauncher = SiteCreationWizardLauncher()
700-
guard let wizard = wizardLauncher.ui else {
701-
return
699+
JetpackFeaturesRemovalCoordinator.presentSiteCreationOverlayIfNeeded(in: self) {
700+
guard JetpackFeaturesRemovalCoordinator.siteCreationPhase() != .two else {
701+
return
702+
}
703+
704+
// Display site creation flow if not in phase two
705+
let wizardLauncher = SiteCreationWizardLauncher()
706+
guard let wizard = wizardLauncher.ui else {
707+
return
708+
}
709+
self.present(wizard, animated: true)
710+
WPAnalytics.track(.enhancedSiteCreationAccessed, withProperties: ["source": source])
702711
}
703-
present(wizard, animated: true)
704-
WPAnalytics.track(.enhancedSiteCreationAccessed, withProperties: ["source": source])
705712
}
706713

707714
@objc

0 commit comments

Comments
 (0)