Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 5277dbe

Browse files
committed
Make pages property private in LoginProloguePageViewController
The rationale is to prevent usages outside of the file to facilitate getting rid of it in the future.
1 parent 113290f commit 5277dbe

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

WordPressAuthenticator/Signin/LoginProloguePageViewController.swift

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import UIKit
22
import WordPressShared
33

44
class LoginProloguePageViewController: UIPageViewController {
5-
@objc var pages: [UIViewController] = []
5+
// This property is a legacy of the previous UX iteration. It ought to be removed, but that's
6+
// out of scope at the time of writing. It's now `private` to prevent using it within the
7+
// library in the meantime
8+
@objc private var pages: [UIViewController] = []
9+
610
fileprivate var pageControl: UIPageControl?
711
fileprivate var bgAnimation: UIViewPropertyAnimator?
812
fileprivate struct Constants {
@@ -15,17 +19,6 @@ class LoginProloguePageViewController: UIPageViewController {
1519
dataSource = self
1620
delegate = self
1721

18-
// During the Lottie and related view controllers and portions of view controllers, removal,
19-
// the previous version of this code, without the array length check, crashed in the
20-
// WooCommerce UI tests.
21-
//
22-
// I believe the reason is that the views and flows in this library haven't properly been
23-
// updated to reflect the simplification in the UX and there are still elements that
24-
// require this class to exist and be instantiated, even though it might not be used
25-
// directly.
26-
if pages.isEmpty == false {
27-
setViewControllers([pages[0]], direction: .forward, animated: false)
28-
}
2922
view.backgroundColor = WordPressAuthenticator.shared.style.prologueBackgroundColor
3023

3124
addPageControl()

0 commit comments

Comments
 (0)