@@ -93,10 +93,6 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
93
93
}
94
94
95
95
get {
96
- guard FeatureFlag . mySiteDashboard. enabled else {
97
- return blogDetailsViewController? . blog
98
- }
99
-
100
96
return sitePickerViewController? . blog
101
97
}
102
98
}
@@ -164,35 +160,23 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
164
160
}
165
161
166
162
private func updateSegmentedControl( for blog: Blog ) {
167
- guard FeatureFlag . mySiteDashboard. enabled else {
168
- return
169
- }
170
-
171
163
// The segmented control should be hidden if the blog is not a WP.com/Atomic/Jetpack site, or if the device is an iPad
172
- segmentedControlContainerView. isHidden = !blog. isAccessibleThroughWPCom ( ) || UIDevice . isPad ( )
164
+ segmentedControlContainerView. isHidden = !FeatureFlag . mySiteDashboard . enabled || ! blog. isAccessibleThroughWPCom ( ) || UIDevice . isPad ( )
173
165
}
174
166
175
167
private func setupView( ) {
176
168
view. backgroundColor = . listBackground
177
169
}
178
170
179
- /// If the My Site Dashboard feature flag is enabled, then this method builds a layout with the following
180
- /// view hierarchy:
171
+ /// This method builds a layout with the following view hierarchy:
181
172
///
182
173
/// - Scroll view
183
174
/// - Stack view
184
175
/// - Segmented control container view
185
176
/// - Segmented control
186
177
/// - Child view controller
187
- ///
188
- /// Otherwise, if the My Site Dashboard feature flag is disabled, this method does nothing and the
189
- /// child vc is added directly to the root view of the view controller in showBlogDetails.
190
178
///
191
179
private func setupConstraints( ) {
192
- guard FeatureFlag . mySiteDashboard. enabled else {
193
- return
194
- }
195
-
196
180
view. addSubview ( scrollView)
197
181
view. pinSubviewToAllEdges ( scrollView)
198
182
scrollView. addSubview ( stackView)
@@ -527,13 +511,7 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
527
511
528
512
addMeButtonToNavigationBar ( email: blog. account? . email, meScenePresenter: meScenePresenter)
529
513
530
- if FeatureFlag . mySiteDashboard. enabled {
531
- embedChildInStackView ( blogDetailsViewController)
532
- } else {
533
- add ( blogDetailsViewController)
534
- blogDetailsViewController. view. translatesAutoresizingMaskIntoConstraints = false
535
- view. pinSubviewToAllEdges ( blogDetailsViewController. view)
536
- }
514
+ embedChildInStackView ( blogDetailsViewController)
537
515
538
516
blogDetailsViewController. showInitialDetailsForBlog ( )
539
517
}
@@ -557,10 +535,6 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
557
535
}
558
536
559
537
private func addSitePickerIfNeeded( for blog: Blog ) {
560
- guard FeatureFlag . mySiteDashboard. enabled else {
561
- return
562
- }
563
-
564
538
guard sitePickerViewController == nil else {
565
539
return
566
540
}
0 commit comments