@@ -211,9 +211,8 @@ - (instancetype)initWithTitle:(NSString *)title
211211
212212#pragma mark -
213213
214- @interface BlogDetailsViewController () <UIActionSheetDelegate, UIAlertViewDelegate, WPSplitViewControllerDetailProvider, BlogDetailHeaderViewDelegate, UITableViewDelegate, UITableViewDataSource>
214+ @interface BlogDetailsViewController () <UIActionSheetDelegate, UIAlertViewDelegate, WPSplitViewControllerDetailProvider, UITableViewDelegate, UITableViewDataSource>
215215
216- @property (nonatomic , strong , readwrite ) BlogDetailHeaderView *headerView;
217216@property (nonatomic , strong ) NSArray *headerViewHorizontalConstraints;
218217@property (nonatomic , strong ) NSArray <BlogDetailsSection *> *tableSections;
219218@property (nonatomic , strong ) BlogService *blogService;
@@ -407,8 +406,6 @@ - (void)viewWillAppear:(BOOL)animated
407406
408407 self.navigationItem .title = NSLocalizedString(@" My Site" , @" Title of My Site tab" );
409408
410- [self .headerView setBlog: self .blog];
411-
412409 // Configure and reload table data when appearing to ensure pending comment count is updated
413410 [self configureTableViewData ];
414411
@@ -744,8 +741,10 @@ - (UITableViewScrollPosition)optimumScrollPositionForIndexPath:(NSIndexPath *)in
744741- (void )configureTableViewData
745742{
746743 NSMutableArray *marr = [NSMutableArray array ];
747-
748- [marr addObject: [self quickActionsSectionViewModel ]];
744+
745+ if (AppConfiguration.showsQuickActions ) {
746+ [marr addObject: [self quickActionsSectionViewModel ]];
747+ }
749748 if ([DomainCreditEligibilityChecker canRedeemDomainCreditWithBlog: self .blog]) {
750749 if (!self.hasLoggedDomainCreditPromptShownEvent ) {
751750 [WPAnalytics track: WPAnalyticsStatDomainCreditPromptShown];
@@ -1077,7 +1076,6 @@ - (BOOL)shouldDisplayLinkToWPAdmin
10771076
10781077- (void )switchToBlog : (Blog*)blog
10791078{
1080- self.headerView .blog = blog;
10811079 self.blog = blog;
10821080 [self showInitialDetailsForBlog ];
10831081 [self .tableView reloadData ];
@@ -1713,21 +1711,20 @@ - (UIPresentationController *)presentationControllerForPresentedViewController:(
17131711
17141712- (void )updateTableViewAndHeader
17151713{
1716- [self updateTableViewAndHeader : ^{}];
1714+ [self updateTableView : ^{}];
17171715}
17181716
1719- // / This method syncs the blog and its metadata, then reloads the table view and updates the header with the synced blog .
1717+ // / This method syncs the blog and its metadata, then reloads the table view.
17201718// /
1721- - (void )updateTableViewAndHeader : (void (^)(void ))onComplete
1719+ - (void )updateTableView : (void (^)(void ))completion
17221720{
17231721 __weak __typeof (self) weakSelf = self;
17241722 [self .blogService syncBlogAndAllMetadata: self .blog
17251723 completionHandler:
17261724 ^{
17271725 [weakSelf configureTableViewData ];
17281726 [weakSelf reloadTableViewPreservingSelection ];
1729- [weakSelf.headerView setBlog: weakSelf.blog];
1730- onComplete ();
1727+ completion ();
17311728 }];
17321729}
17331730
@@ -1738,7 +1735,7 @@ - (void)pulledToRefresh {
17381735
17391736- (void )pulledToRefreshWith : (UIRefreshControl *)refreshControl onCompletion : ( void (^)(void ))completion {
17401737
1741- [self updateTableViewAndHeader : ^{
1738+ [self updateTableView : ^{
17421739 // WORKAROUND: if we don't dispatch this asynchronously, the refresh end animation is clunky.
17431740 // To recognize if we can remove this, simply remove the dispatch_async call and test pulling
17441741 // down to refresh the site.
0 commit comments