     override func viewDidLoad() {
         super.viewDidLoad()
         collectionView.register(InsertMediaSearchResultCollectionViewCell.self, forCellWithReuseIdentifier: InsertMediaSearchResultCollectionViewCell.identifier)
-        view.wmf_addSubviewWithConstraintsToEdges(collectionView)
         additionalSafeAreaInsets = UIEdgeInsets(top: 0, left: 0, bottom: flowLayout.minimumLineSpacing, right: 0)
-        collectionView.contentInset = UIEdgeInsets(top: 0, left: 12, bottom: 0, right: 12)
         apply(theme: theme)
-    }
-
-    override func viewDidAppear(_ animated: Bool) {
-        super.viewDidAppear(animated)
-        originalContentOffsetY = collectionView.contentOffset.y
     }
 
     func reload() {

        return indexPath
    }

    override func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? {
        guard
            let indexPath = collectionViewIndexPathForPreviewingContext(previewingContext, location: location),
            let searchResult = searchResults[safeIndex: indexPath.item],

    }
}

class InsertMediaSearchResultsCollectionViewController: UICollectionViewController {
    private var theme = Theme.standard
    private var flowLayout: FlowLayout {
        return collectionView.collectionViewLayout as! FlowLayout
    }

    weak var delegate: InsertMediaSearchResultsCollectionViewControllerDelegate?
    weak var scrollDelegate: InsertMediaSearchResultsCollectionViewControllerScrollDelegate?

    var searchResults = [InsertMediaSearchResult]() {
        didSet {
