@@ -384,6 +384,8 @@ - (void)viewDidLoad
384384 [self .tableView registerClass: [MigrationSuccessCell class ] forCellReuseIdentifier: BlogDetailsMigrationSuccessCellIdentifier];
385385 [self .tableView registerClass: [JetpackBrandingMenuCardCell class ] forCellReuseIdentifier: BlogDetailsJetpackBrandingCardCellIdentifier];
386386 [self .tableView registerClass: [JetpackRemoteInstallTableViewCell class ] forCellReuseIdentifier: BlogDetailsJetpackInstallCardCellIdentifier];
387+
388+ self.tableView .cellLayoutMarginsFollowReadableWidth = YES ;
387389
388390 self.hasLoggedDomainCreditPromptShownEvent = NO ;
389391
@@ -409,7 +411,7 @@ - (void)viewWillAppear:(BOOL)animated
409411
410412 [self observeWillEnterForegroundNotification ];
411413
412- if (self.splitViewControllerIsHorizontallyCompact ) {
414+ if (! self.isSplitViewDisplayed ) {
413415 self.restorableSelectedIndexPath = nil ;
414416 }
415417
@@ -994,7 +996,7 @@ - (void)reloadTableViewPreservingSelection
994996
995997 BOOL isValidIndexPath = self.restorableSelectedIndexPath .section < self.tableView .numberOfSections &&
996998 self.restorableSelectedIndexPath .row < [self .tableView numberOfRowsInSection: self .restorableSelectedIndexPath.section];
997- if (isValidIndexPath && ! [self splitViewControllerIsHorizontallyCompact ]) {
999+ if (isValidIndexPath && [self isSplitViewDisplayed ]) {
9981000 // And finally we'll reselect the selected row, if there is one
9991001 [self .tableView selectRowAtIndexPath: self .restorableSelectedIndexPath
10001002 animated: NO
@@ -1038,7 +1040,7 @@ - (void)configureTableViewData
10381040 if ([self shouldShowQuickStartChecklist ]) {
10391041 [marr addNullableObject: [self quickStartSectionViewModel ]];
10401042 }
1041- if ([self isDashboardEnabled ] && ! [self splitViewControllerIsHorizontallyCompact ]) {
1043+ if ([self isDashboardEnabled ] && [self isSplitViewDisplayed ]) {
10421044 [marr addNullableObject: [self homeSectionViewModel ]];
10431045 }
10441046
@@ -1077,6 +1079,10 @@ - (void)configureTableViewData
10771079 self.tableSections = [NSArray arrayWithArray: marr];
10781080}
10791081
1082+ - (Boolean)isSplitViewDisplayed {
1083+ return ![self splitViewControllerIsHorizontallyCompact ] && [MySitesCoordinator isSplitViewEnabled ];
1084+ }
1085+
10801086// / This section is available on Jetpack only.
10811087- (BlogDetailsSection *)contentSectionViewModel
10821088{
@@ -1511,7 +1517,7 @@ - (void)switchToBlog:(Blog*)blog
15111517
15121518- (void )showInitialDetailsForBlog
15131519{
1514- if ([self splitViewControllerIsHorizontallyCompact ]) {
1520+ if (! [self isSplitViewDisplayed ]) {
15151521 return ;
15161522 }
15171523
@@ -1617,7 +1623,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
16171623 [WPStyleGuide configureTableViewDestructiveActionCell: cell];
16181624 } else {
16191625 if (row.showsDisclosureIndicator ) {
1620- cell.accessoryType = [self splitViewControllerIsHorizontallyCompact ] ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone ;
1626+ cell.accessoryType = [self isSplitViewDisplayed ] ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator ;
16211627 } else {
16221628 cell.accessoryType = UITableViewCellAccessoryNone;
16231629 }
@@ -1654,7 +1660,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
16541660 if (row.showsSelectionState ) {
16551661 self.restorableSelectedIndexPath = indexPath;
16561662 } else {
1657- if ([self splitViewControllerIsHorizontallyCompact ]) {
1663+ if (! [self isSplitViewDisplayed ]) {
16581664 // Deselect current row when not in split view layout
16591665 [tableView deselectRowAtIndexPath: indexPath animated: YES ];
16601666 } else {
0 commit comments