diff --git a/Tusker/Screens/Conversation/ConversationTableViewController.swift b/Tusker/Screens/Conversation/ConversationTableViewController.swift index 987b9aa4..81149d21 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 dac30d91..ef2e21d9 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 f84d4513..7bfae8e3 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 3c35af59..58ef34a0 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 d7084547..ca2e988c 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 d183f062..34ba18bf 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 d1522afa..07032279 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 604c379c..1ac1e553 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 71fd77ee..e698d6f7 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 3f5fa713..9969035a 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + +