Procházet zdrojové kódy

MediaCategoryViewController: Remove unnecessary layout update

This could lead to potential crash since editCollectionViewLayout
isn't set yet.

Additionally, it will get updated once the layout will be set.
Soomin Lee před 5 roky
rodič
revize
6fd4315fa0

+ 0 - 1
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -295,7 +295,6 @@ class MediaCategoryViewController: UICollectionViewController, UICollectionViewD
     private func displayEditToolbar() {
         UIView.animate(withDuration: 0.3) { [weak self] in
             self?.editToolbarConstraint?.constant = self?.isEditing == true ? 0 : EditToolbar.height
-            self?.view.layoutIfNeeded()
             self?.collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: self?.isEditing == true ? EditToolbar.height : 0, right: 0)
         }
     }