Compare commits
3 Commits
765b5e1a7c
...
6f51f321f6
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 6f51f321f6 | |
Shadowfacts | ab17a688cf | |
Shadowfacts | 18bc6ce61e |
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() }
|
||||
|
|
Loading…
Reference in New Issue