Skip to content

Commit 21b95e1

Browse files
author
Momo Ozawa
committed
Refactor: add create button coordinator to MySiteVC
1 parent 3739d7e commit 21b95e1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,18 @@ - (void)viewDidLoad
382382
[self startObservingQuickStart];
383383
[self addMeButtonToNavigationBarWithEmail:self.blog.account.email meScenePresenter:self.meScenePresenter];
384384

385-
[self.createButtonCoordinator addTo:self.view trailingAnchor:self.view.safeAreaLayoutGuide.trailingAnchor bottomAnchor:self.view.safeAreaLayoutGuide.bottomAnchor];
385+
if ([Feature enabled:FeatureFlagMySiteDashboard]) {
386+
MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController;
387+
388+
[self.createButtonCoordinator addTo:parentVC.view
389+
trailingAnchor:parentVC.view.safeAreaLayoutGuide.trailingAnchor
390+
bottomAnchor:parentVC.view.safeAreaLayoutGuide.bottomAnchor];
391+
} else {
392+
[self.createButtonCoordinator addTo:self.view
393+
trailingAnchor:self.view.safeAreaLayoutGuide.trailingAnchor
394+
bottomAnchor:self.view.safeAreaLayoutGuide.bottomAnchor];
395+
}
396+
386397
}
387398

388399
/// Resizes the `tableHeaderView` as necessary whenever its size changes.

0 commit comments

Comments
 (0)