Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #6701: disable QR Pairing for China #6702

Merged
merged 1 commit into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion Client/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,10 @@ extension BrowserViewController {
parentType = .settings
object = .settings
}
let signInVC = FirefoxAccountSignInViewController(profile: profile, parentType: parentType)

let signInVC = AppInfo.isChinaEdition ?
Copy link
Contributor

@nbhasin2 nbhasin2 May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Library Panel
  • Photon sheet
  • Onboarding cards

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

override func onClick(_ navigationController: UINavigationController?) {
let viewController = FirefoxAccountSignInViewController(profile: profile, parentType: .settings)
let viewController = AppInfo.isChinaEdition ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Settings menu (Sign in to sync)

FxAWebViewController(pageType: .emailLoginFlow, profile: profile, dismissalStyle: .popToRootVC) :
FirefoxAccountSignInViewController(profile: profile, parentType: .settings)
UnifiedTelemetry.recordEvent(category: .firefoxAccount, method: .view, object: .settings)
navigationController?.pushViewController(viewController, animated: true)
}
Expand Down Expand Up @@ -337,7 +339,9 @@ class AccountStatusSetting: WithAccountSetting {

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