diff --git a/Tusker/Screens/Conversation/ConversationTableViewController.swift b/Tusker/Screens/Conversation/ConversationTableViewController.swift index 987b9aa47c..81149d2138 100644 --- a/Tusker/Screens/Conversation/ConversationTableViewController.swift +++ b/Tusker/Screens/Conversation/ConversationTableViewController.swift @@ -72,6 +72,7 @@ class ConversationTableViewController: EnhancedTableViewController { // separators are disabled on the table view so we can re-add them ourselves // so they're not inserted in between statuses in the ame sub-thread tableView.separatorStyle = .none + tableView.cellLayoutMarginsFollowReadableWidth = true dataSource = UITableViewDiffableDataSource(tableView: tableView, cellProvider: { (tableView, indexPath, item) -> UITableViewCell? in switch item { diff --git a/Tusker/Screens/Conversation/ExpandThreadTableViewCell.swift b/Tusker/Screens/Conversation/ExpandThreadTableViewCell.swift index dac30d918b..ef2e21d993 100644 --- a/Tusker/Screens/Conversation/ExpandThreadTableViewCell.swift +++ b/Tusker/Screens/Conversation/ExpandThreadTableViewCell.swift @@ -28,13 +28,13 @@ class ExpandThreadTableViewCell: UITableViewCell { threadLinkView.translatesAutoresizingMaskIntoConstraints = false threadLinkView.backgroundColor = tintColor.withAlphaComponent(0.5) threadLinkView.layer.cornerRadius = 2.5 - addSubview(threadLinkView) - threadLinkViewFullHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: bottomAnchor) + contentView.addSubview(threadLinkView) + threadLinkViewFullHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor) threadLinkViewShortHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: avatarContainerView.topAnchor, constant: -2) NSLayoutConstraint.activate([ threadLinkView.widthAnchor.constraint(equalToConstant: 5), - threadLinkView.centerXAnchor.constraint(equalTo: leadingAnchor, constant: 25 + 16 /* system spacing */), - threadLinkView.topAnchor.constraint(equalTo: topAnchor), + threadLinkView.centerXAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor, constant: 25), + threadLinkView.topAnchor.constraint(equalTo: contentView.topAnchor), threadLinkViewFullHeightConstraint, ]) diff --git a/Tusker/Screens/Conversation/ExpandThreadTableViewCell.xib b/Tusker/Screens/Conversation/ExpandThreadTableViewCell.xib index f84d4513bd..7bfae8e360 100644 --- a/Tusker/Screens/Conversation/ExpandThreadTableViewCell.xib +++ b/Tusker/Screens/Conversation/ExpandThreadTableViewCell.xib @@ -1,9 +1,9 @@ - + - + @@ -14,7 +14,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -49,9 +49,9 @@ - + - + diff --git a/Tusker/Screens/Notifications/NotificationsTableViewController.swift b/Tusker/Screens/Notifications/NotificationsTableViewController.swift index 3c35af59ed..58ef34a077 100644 --- a/Tusker/Screens/Notifications/NotificationsTableViewController.swift +++ b/Tusker/Screens/Notifications/NotificationsTableViewController.swift @@ -55,6 +55,7 @@ class NotificationsTableViewController: DiffableTimelineLikeTableViewController< tableView.register(UINib(nibName: "PollFinishedTableViewCell", bundle: .main), forCellReuseIdentifier: pollCell) tableView.register(UINib(nibName: "StatusUpdatedNotificationTableViewCell", bundle: .main), forCellReuseIdentifier: updatedCell) tableView.register(UINib(nibName: "BasicTableViewCell", bundle: .main), forCellReuseIdentifier: unknownCell) + tableView.cellLayoutMarginsFollowReadableWidth = true } private func request(range: RequestRange) -> Request<[Pachyderm.Notification]> { diff --git a/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.xib b/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.xib index d708454785..ca2e988cd4 100644 --- a/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.xib +++ b/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.xib @@ -14,7 +14,7 @@ - + diff --git a/Tusker/Views/Notifications/PollFinishedTableViewCell.xib b/Tusker/Views/Notifications/PollFinishedTableViewCell.xib index d183f062a6..34ba18bf58 100644 --- a/Tusker/Views/Notifications/PollFinishedTableViewCell.xib +++ b/Tusker/Views/Notifications/PollFinishedTableViewCell.xib @@ -14,7 +14,7 @@ - + @@ -66,7 +66,7 @@ - + diff --git a/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib b/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib index d1522afac9..07032279dc 100644 --- a/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib +++ b/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib @@ -5,257 +5,257 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + diff --git a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift index 604c379c87..1ac1e553c7 100644 --- a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift @@ -495,8 +495,8 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti filteredLabel.removeFromSuperview() contentView.addSubview(statusContainer) NSLayoutConstraint.activate([ - statusContainer.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), - statusContainer.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), + statusContainer.leadingAnchor.constraint(equalTo: UIDevice.current.userInterfaceIdiom == .pad ? contentView.readableContentGuide.leadingAnchor : contentView.leadingAnchor), + statusContainer.trailingAnchor.constraint(equalTo: UIDevice.current.userInterfaceIdiom == .pad ? contentView.readableContentGuide.trailingAnchor : contentView.trailingAnchor), statusContainer.topAnchor.constraint(equalTo: contentView.topAnchor), statusContainer.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), ]) @@ -506,8 +506,8 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti statusContainer.removeFromSuperview() contentView.addSubview(filteredLabel) NSLayoutConstraint.activate([ - filteredLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), - filteredLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), + filteredLabel.leadingAnchor.constraint(equalTo: UIDevice.current.userInterfaceIdiom == .pad ? contentView.readableContentGuide.leadingAnchor : contentView.leadingAnchor), + filteredLabel.trailingAnchor.constraint(equalTo: UIDevice.current.userInterfaceIdiom == .pad ? contentView.readableContentGuide.trailingAnchor : contentView.trailingAnchor), filteredLabel.topAnchor.constraint(equalToSystemSpacingBelow: contentView.topAnchor, multiplier: 1), contentView.bottomAnchor.constraint(equalToSystemSpacingBelow: filteredLabel.bottomAnchor, multiplier: 1), ]) diff --git a/Tusker/Views/Status/TimelineStatusTableViewCell.swift b/Tusker/Views/Status/TimelineStatusTableViewCell.swift index 71fd77ee7f..e698d6f7ae 100644 --- a/Tusker/Views/Status/TimelineStatusTableViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusTableViewCell.swift @@ -25,8 +25,6 @@ class TimelineStatusTableViewCell: BaseStatusTableViewCell { @IBOutlet weak var pinImageView: UIImageView! @IBOutlet weak var actionsContainerView: UIView! @IBOutlet weak var actionsContainerHeightConstraint: NSLayoutConstraint! - @IBOutlet weak var verticalStackToActionsContainerConstraint: NSLayoutConstraint! - @IBOutlet weak var verticalStackToSuperviewConstraint: NSLayoutConstraint! var reblogStatusID: String? var rebloggerID: String? diff --git a/Tusker/Views/Status/TimelineStatusTableViewCell.xib b/Tusker/Views/Status/TimelineStatusTableViewCell.xib index 3f5fa713ce..9969035a2f 100644 --- a/Tusker/Views/Status/TimelineStatusTableViewCell.xib +++ b/Tusker/Views/Status/TimelineStatusTableViewCell.xib @@ -4,267 +4,271 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + +