Skip to content

Commit dccd89f

Browse files
committed
Present alert for instruction to connect to a WP.com site
1 parent 5b36260 commit dccd89f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

WooCommerce/Classes/Authentication/Navigation Exceptions/WrongAccountErrorViewModel.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ final class WrongAccountErrorViewModel: ULAccountMismatchViewModel {
132132
if isSelfHostedSite {
133133
return showSiteCredentialLoginAndJetpackConnection(from: viewController)
134134
}
135-
return // TODO: show alert
135+
return presentConnectToWPComSiteAlert(from: viewController)
136136
}
137137

138138
showJetpackConnectionWebView(url: url, from: viewController)
@@ -232,6 +232,13 @@ private extension WrongAccountErrorViewModel {
232232
}
233233
}
234234

235+
func presentConnectToWPComSiteAlert(from viewController: UIViewController) {
236+
let fancyAlert = FancyAlertViewController.makeConnectAccountToWPComSiteAlert()
237+
fancyAlert.modalPresentationStyle = .custom
238+
fancyAlert.transitioningDelegate = AppDelegate.shared.tabBarController
239+
viewController.present(fancyAlert, animated: true)
240+
}
241+
235242
/// Presents a web view pointing to the Jetpack connection URL.
236243
///
237244
func showJetpackConnectionWebView(url: URL, from viewController: UIViewController) {

0 commit comments

Comments
 (0)