Don't use readable content inset for search results

This commit is contained in:
Shadowfacts 2023-02-25 15:10:21 -05:00
parent 765b5e1a7c
commit 18bc6ce61e
1 changed files with 2 additions and 3 deletions

View File

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