Skip to content

Commit 5454b6c

Browse files
committed
Remove check for simplified login feature flag in the store picker
1 parent 4a73c1b commit 5454b6c

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

WooCommerce/Classes/Authentication/Epilogue/StorePickerViewController.swift

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ final class StorePickerViewController: UIViewController {
105105
didSet {
106106
addStoreButton.backgroundColor = .clear
107107
addStoreButton.titleFont = StyleManager.actionButtonTitleFont
108-
let title = isSimplifiedLogin ? Localization.addStoreButton : Localization.enterSiteAddress
109-
addStoreButton.setTitle(title, for: .normal)
108+
addStoreButton.setTitle(Localization.addStoreButton, for: .normal)
110109
}
111110
}
112111

@@ -173,10 +172,6 @@ final class StorePickerViewController: UIViewController {
173172
self?.restartAuthentication()
174173
}
175174

176-
private lazy var isSimplifiedLogin: Bool = {
177-
featureFlagService.isFeatureFlagEnabled(.simplifiedLoginFlowI1)
178-
}()
179-
180175
private var storeCreationCoordinator: StoreCreationCoordinator?
181176

182177
private let appleIDCredentialChecker: AppleIDCredentialCheckerProtocol
@@ -226,9 +221,7 @@ final class StorePickerViewController: UIViewController {
226221
override func viewWillLayoutSubviews() {
227222
super.viewWillLayoutSubviews()
228223
tableView.updateHeaderHeight()
229-
if isSimplifiedLogin {
230-
tableView.updateFooterHeight()
231-
}
224+
tableView.updateFooterHeight()
232225
}
233226

234227
override func viewWillAppear(_ animated: Bool) {
@@ -332,11 +325,6 @@ private extension StorePickerViewController {
332325
}
333326

334327
func presentAddStoreActionSheet() {
335-
// If store creation is disabled, navigate the user directly to site discovery
336-
guard featureFlagService.isFeatureFlagEnabled(.storeCreationMVP) else {
337-
return presentSiteDiscovery()
338-
}
339-
340328
let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
341329
actionSheet.view.tintColor = .black
342330
let createStoreAction = UIAlertAction(title: Localization.createStore, style: .default) { [weak self] _ in
@@ -438,7 +426,7 @@ private extension StorePickerViewController {
438426
case .empty:
439427
updateActionButtonAndTableState(animating: false, enabled: false)
440428
addStoreButton.isHidden = false
441-
newToWooButton.isHidden = isSimplifiedLogin
429+
newToWooButton.isHidden = true
442430
case .available(let sites):
443431
addStoreButton.isHidden = true
444432
newToWooButton.isHidden = true
@@ -455,9 +443,9 @@ private extension StorePickerViewController {
455443
///
456444
func updateFooterViewIfNeeded() {
457445
switch viewModel.state {
458-
case .available where isSimplifiedLogin == true:
446+
case .available:
459447
tableView.tableFooterView = addStoreFooterView
460-
default:
448+
case .empty:
461449
tableView.tableFooterView = UIView()
462450
}
463451
}
@@ -557,7 +545,7 @@ private extension StorePickerViewController {
557545
hideActionButton()
558546
displayFancyWCRequirementAlert(siteName: siteName)
559547
addStoreButton.isHidden = false
560-
newToWooButton.isHidden = isSimplifiedLogin
548+
newToWooButton.isHidden = true
561549
}
562550

563551
/// Update the UI when the user has a valid login
@@ -637,7 +625,7 @@ private extension StorePickerViewController {
637625
/// or the add store action sheet for simplified login.
638626
///
639627
@IBAction private func addStoreWasPressed() {
640-
if isSimplifiedLogin {
628+
if featureFlagService.isFeatureFlagEnabled(.storeCreationMVP) {
641629
ServiceLocator.analytics.track(.sitePickerAddStoreTapped)
642630
presentAddStoreActionSheet()
643631
} else {
@@ -838,8 +826,6 @@ private extension StorePickerViewController {
838826
static let continueButton = NSLocalizedString("Continue", comment: "Button on the Store Picker screen to select a store")
839827
static let tryAnotherAccount = NSLocalizedString("Log In With Another Account",
840828
comment: "Button to trigger connection to another account in store picker")
841-
static let enterSiteAddress = NSLocalizedString("Enter Your Store Address",
842-
comment: "Button to input a site address in store picker when there are no stores found")
843829
static let newToWooCommerce = NSLocalizedString("New to WooCommerce?",
844830
comment: "Title of button on the site picker screen for users who are new to WooCommerce.")
845831
static let createStore = NSLocalizedString("Create a new store",

0 commit comments

Comments
 (0)