2222static NSString *const BlogDetailsPlanCellIdentifier = @" BlogDetailsPlanCell" ;
2323static NSString *const BlogDetailsSettingsCellIdentifier = @" BlogDetailsSettingsCell" ;
2424static NSString *const BlogDetailsRemoveSiteCellIdentifier = @" BlogDetailsRemoveSiteCell" ;
25+ static NSString *const BlogDetailsQuickActionsCellIdentifier = @" BlogDetailsQuickActionsCell" ;
2526static NSString *const BlogDetailsSectionHeaderViewIdentifier = @" BlogDetailsSectionHeaderView" ;
2627static NSString *const QuickStartHeaderViewNibName = @" BlogDetailsSectionHeaderView" ;
2728static NSString *const QuickStartListTitleCellNibName = @" QuickStartListTitleCell" ;
@@ -326,7 +327,7 @@ - (void)viewDidLoad
326327{
327328 [super viewDidLoad ];
328329
329- _tableView = [[UITableView alloc ] initWithFrame: CGRectZero style: UITableViewStyleGrouped ];
330+ _tableView = [[UITableView alloc ] initWithFrame: CGRectZero style: UITableViewStyleInsetGrouped ];
330331 self.tableView .delegate = self;
331332 self.tableView .dataSource = self;
332333 self.tableView .translatesAutoresizingMaskIntoConstraints = false ;
@@ -346,6 +347,7 @@ - (void)viewDidLoad
346347 [self .tableView registerClass: [WPTableViewCellValue1 class ] forCellReuseIdentifier: BlogDetailsPlanCellIdentifier];
347348 [self .tableView registerClass: [WPTableViewCellValue1 class ] forCellReuseIdentifier: BlogDetailsSettingsCellIdentifier];
348349 [self .tableView registerClass: [WPTableViewCell class ] forCellReuseIdentifier: BlogDetailsRemoveSiteCellIdentifier];
350+ [self .tableView registerClass: [QuickActionsCell class ] forCellReuseIdentifier: BlogDetailsQuickActionsCellIdentifier];
349351 UINib *qsHeaderViewNib = [UINib nibWithNibName: QuickStartHeaderViewNibName bundle: [NSBundle bundleForClass: [QuickStartListTitleCell class ]]];
350352 [self .tableView registerNib: qsHeaderViewNib forHeaderFooterViewReuseIdentifier: BlogDetailsSectionHeaderViewIdentifier];
351353 UINib *qsTitleCellNib = [UINib nibWithNibName: QuickStartListTitleCellNibName bundle: [NSBundle bundleForClass: [QuickStartListTitleCell class ]]];
@@ -751,6 +753,7 @@ - (void)configureTableViewData
751753{
752754 NSMutableArray *marr = [NSMutableArray array ];
753755
756+ [marr addObject: [self quickActionsSectionViewModel ]];
754757 if ([DomainCreditEligibilityChecker canRedeemDomainCreditWithBlog: self .blog]) {
755758 if (!self.hasLoggedDomainCreditPromptShownEvent ) {
756759 [WPAnalytics track: WPAnalyticsStatDomainCreditPromptShown];
@@ -1399,6 +1402,12 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
13991402- (NSInteger )tableView : (UITableView *)tableView numberOfRowsInSection : (NSInteger )section
14001403{
14011404 BlogDetailsSection *detailSection = [self .tableSections objectAtIndex: section];
1405+
1406+ // / For larger texts we don't show the quick actions row
1407+ if (detailSection.category == BlogDetailsSectionCategoryQuickAction && self.isAccessibilityCategoryEnabled ) {
1408+ return 0 ;
1409+ }
1410+
14021411 return [detailSection.rows count ];
14031412}
14041413
@@ -1422,6 +1431,13 @@ - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPa
14221431- (UITableViewCell *)tableView : (UITableView *)tableView cellForRowAtIndexPath : (NSIndexPath *)indexPath
14231432{
14241433 BlogDetailsSection *section = [self .tableSections objectAtIndex: indexPath.section];
1434+
1435+ if (section.category == BlogDetailsSectionCategoryQuickAction) {
1436+ QuickActionsCell *cell = [tableView dequeueReusableCellWithIdentifier: BlogDetailsQuickActionsCellIdentifier];
1437+ [self configureQuickActionsWithCell: cell];
1438+ return cell;
1439+ }
1440+
14251441 BlogDetailsRow *row = [section.rows objectAtIndex: indexPath.row];
14261442 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: row.identifier];
14271443 cell.accessibilityHint = row.accessibilityHint ;
@@ -1483,12 +1499,8 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
14831499 BlogDetailsSection *section = [self .tableSections objectAtIndex: sectionNum];
14841500 if (section.showQuickStartMenu ) {
14851501 return [self quickStartHeaderWithTitle: section.title];
1486- } else if (sectionNum == 0 && [self .blog supports: BlogFeatureJetpackSettings]) {
1487- // Jetpack header shouldn't have any padding
1488- BlogDetailsSectionHeaderView *headerView = (BlogDetailsSectionHeaderView *)[tableView dequeueReusableHeaderFooterViewWithIdentifier: BlogDetailsSectionHeaderViewIdentifier];
1489- headerView.ellipsisButton .hidden = YES ;
1490- headerView.title = @" " ;
1491- return headerView;
1502+ } else if (sectionNum == 0 ) {
1503+ return nil ;
14921504 }
14931505
14941506 return nil ;
0 commit comments