Compare commits

..

3 Commits

3 changed files with 11 additions and 3 deletions

View File

@ -80,9 +80,8 @@ class SearchResultsViewController: UIViewController, CollectionViewController {
break
}
let section = NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment)
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
section.contentInsetsReference = .readableContent
}
// we don't use the readable content inset here, because it insets the entire cell, rather than just the content
// so the cell backgrounds not being full width looks weird
return section
}
view = UICollectionView(frame: .zero, collectionViewLayout: layout)

View File

@ -304,6 +304,12 @@ private class SplitSecondaryNavigationController: EnhancedNavigationViewControll
}
}
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
super.pushViewController(viewController, animated: animated)
configureSecondarySplitCloseButton(for: viewControllers.first!)
}
private func configureSecondarySplitCloseButton(for viewController: UIViewController) {
guard viewController.navigationItem.leftBarButtonItem?.tag != ViewTags.splitNavCloseSecondaryButton else {
return

View File

@ -48,6 +48,9 @@ class TrendHistoryView: UIView {
}
let maxUses = history.max(by: { $0.uses < $1.uses })!.uses
guard maxUses > 0 else {
return
}
// remove old layers if this view is being re-used
layer.sublayers?.forEach { $0.removeFromSuperlayer() }