@@ -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.
@@ -410,9 +421,23 @@ - (void)viewWillAppear:(BOOL)animated
410421 [super viewWillAppear: animated];
411422
412423 if ([[QuickStartTourGuide shared ] currentElementInt ] != NSNotFound ) {
413- self.additionalSafeAreaInsets = UIEdgeInsetsMake (0 , 0 , [BlogDetailsViewController bottomPaddingForQuickStartNotices ], 0 );
424+
425+ if ([Feature enabled: FeatureFlagMySiteDashboard]) {
426+ MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController ;
427+ parentVC.additionalSafeAreaInsets = UIEdgeInsetsMake (0 , 0 , [BlogDetailsViewController bottomPaddingForQuickStartNotices ], 0 );
428+ } else {
429+ self.additionalSafeAreaInsets = UIEdgeInsetsMake (0 , 0 , [BlogDetailsViewController bottomPaddingForQuickStartNotices ], 0 );
430+ }
431+
414432 } else {
415- self.additionalSafeAreaInsets = UIEdgeInsetsZero;
433+
434+ if ([Feature enabled: FeatureFlagMySiteDashboard]) {
435+ MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController ;
436+ parentVC.additionalSafeAreaInsets = UIEdgeInsetsZero;
437+ } else {
438+ self.additionalSafeAreaInsets = UIEdgeInsetsZero;
439+ }
440+
416441 }
417442
418443 if (self.splitViewControllerIsHorizontallyCompact ) {
@@ -1685,13 +1710,25 @@ - (void)scrollToElement:(QuickStartTourElement) element
16851710{
16861711 int sectionCount = 0 ;
16871712 int rowCount = 0 ;
1713+
1714+ MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController ;
1715+
16881716 for (BlogDetailsSection *section in self.tableSections ) {
16891717 rowCount = 0 ;
16901718 for (BlogDetailsRow *row in section.rows ) {
16911719 if (row.quickStartIdentifier == element) {
1692- self. additionalSafeAreaInsets = UIEdgeInsetsMake ( 0 , 0 , [BlogDetailsViewController bottomPaddingForQuickStartNotices ], 0 );
1720+
16931721 NSIndexPath *path = [NSIndexPath indexPathForRow: rowCount inSection: sectionCount];
1694- [self .tableView scrollToRowAtIndexPath: path atScrollPosition: UITableViewScrollPositionTop animated: true ];
1722+
1723+ if ([Feature enabled: FeatureFlagMySiteDashboard]) {
1724+ parentVC.additionalSafeAreaInsets = UIEdgeInsetsMake (0 , 0 , [BlogDetailsViewController bottomPaddingForQuickStartNotices ], 0 );
1725+ UITableViewCell *cell = [self .tableView cellForRowAtIndexPath: path];
1726+ [parentVC.scrollView scrollToView: cell animated: true ];
1727+ } else {
1728+ self.additionalSafeAreaInsets = UIEdgeInsetsMake (0 , 0 , [BlogDetailsViewController bottomPaddingForQuickStartNotices ], 0 );
1729+ [self .tableView scrollToRowAtIndexPath: path atScrollPosition: UITableViewScrollPositionTop animated: true ];
1730+ }
1731+
16951732 }
16961733 rowCount++;
16971734 }
@@ -1911,7 +1948,12 @@ - (void)showViewSiteFromSource:(BlogDetailsNavigationSource)source
19111948 [[QuickStartTourGuide shared ] completeViewSiteTourForBlog: self .blog];
19121949 }
19131950
1914- self.additionalSafeAreaInsets = UIEdgeInsetsZero;
1951+ if ([Feature enabled: FeatureFlagMySiteDashboard]) {
1952+ MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController ;
1953+ parentVC.additionalSafeAreaInsets = UIEdgeInsetsZero;
1954+ } else {
1955+ self.additionalSafeAreaInsets = UIEdgeInsetsZero;
1956+ }
19151957}
19161958
19171959- (void )showViewAdmin
0 commit comments