             destination.params["parentId"] = mediaItem.id
             destination.params["parentName"] = mediaItem.name
             destination.params["isContainer"] = true
-            
+
 //            destination.adapter = newAdapter
             destination.configuration = configuration
 

          }
        }
        else {
          if let destination = MediaItemsController.instantiateController(adapter) {
//            let newAdapter = adapter.clone()
//            newAdapter.params["selectedItem"] = mediaItem
//            newAdapter.params["parentId"] = mediaItem.id


  // MARK: UICollectionViewDataSource

#if os(iOS)
  override open func willRotate(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval) {
    collectionViewLayout.invalidateLayout()
  }

  public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
    if let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
      let itemSize = layout.itemSize
