Skip to content

Commit

Permalink
Fix #6788: enable QR pairing for china edition
Browse files Browse the repository at this point in the history
  • Loading branch information
garvankeeley committed Jun 17, 2020
1 parent 7916fe4 commit febd42d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions Client/Frontend/Browser/BrowserViewController.swift
Expand Up @@ -2117,9 +2117,7 @@ extension BrowserViewController {
object = .settings
}

let signInVC = AppInfo.isChinaEdition ?
FxAWebViewController(pageType: .emailLoginFlow, profile: profile, dismissalStyle: .dismiss, deepLinkParams: deepLinkParams) :
FirefoxAccountSignInViewController(profile: profile, parentType: parentType, deepLinkParams: deepLinkParams)
let signInVC = FirefoxAccountSignInViewController(profile: profile, parentType: parentType, deepLinkParams: deepLinkParams)
UnifiedTelemetry.recordEvent(category: .firefoxAccount, method: .view, object: object)
return signInVC
}
Expand Down
8 changes: 2 additions & 6 deletions Client/Frontend/Settings/AppSettingsOptions.swift
Expand Up @@ -47,9 +47,7 @@ class ConnectSetting: WithoutAccountSetting {
override var accessibilityIdentifier: String? { return "SignInToSync" }

override func onClick(_ navigationController: UINavigationController?) {
let viewController = AppInfo.isChinaEdition ?
FxAWebViewController(pageType: .emailLoginFlow, profile: profile, dismissalStyle: .popToRootVC, deepLinkParams: nil) :
FirefoxAccountSignInViewController(profile: profile, parentType: .settings, deepLinkParams: nil)
let viewController = FirefoxAccountSignInViewController(profile: profile, parentType: .settings, deepLinkParams: nil)
UnifiedTelemetry.recordEvent(category: .firefoxAccount, method: .view, object: .settings)
navigationController?.pushViewController(viewController, animated: true)
}
Expand Down Expand Up @@ -340,9 +338,7 @@ class AccountStatusSetting: WithAccountSetting {

override func onClick(_ navigationController: UINavigationController?) {
guard !profile.rustFxA.accountNeedsReauth() else {
let vc = AppInfo.isChinaEdition ?
FxAWebViewController(pageType: .emailLoginFlow, profile: profile, dismissalStyle: .popToRootVC, deepLinkParams: nil) :
FirefoxAccountSignInViewController(profile: profile, parentType: .settings, deepLinkParams: nil)
let vc = FirefoxAccountSignInViewController(profile: profile, parentType: .settings, deepLinkParams: nil)
UnifiedTelemetry.recordEvent(category: .firefoxAccount, method: .view, object: .settings)
navigationController?.pushViewController(vc, animated: true)
return
Expand Down

0 comments on commit febd42d

Please sign in to comment.