File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Feature/Feature/SharedVideoEditView Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -458,19 +458,20 @@ extension SharedVideoEditViewController: UICollectionViewDropDelegate {
458458 var updatedItems = currentItems
459459 updatedItems. insert ( contentsOf: draggedItems, at: targetIndex)
460460
461+ coordinator. items. forEach { item in
462+ coordinator. drop ( item. dragItem, toItemAt: destinationIndexPath)
463+ }
464+
461465 applySnapShot ( with: updatedItems)
462466
463- guard let reorderItem = videoTimelineDataSource. itemIdentifier ( for: destinationIndexPath) else { return }
464-
465467 collectionView. scrollToItem (
466468 at: destinationIndexPath,
467469 at: . centeredHorizontally,
468470 animated: true
469471 )
470472
471- coordinator. items. forEach { item in
472- coordinator. drop ( item. dragItem, toItemAt: destinationIndexPath)
473- }
473+ guard let reorderItem = videoTimelineDataSource. itemIdentifier ( for: destinationIndexPath) else { return }
474+
474475 input. send ( . timelineCellOrderDidChanged( to: targetIndex, url: reorderItem. url) )
475476 }
476477}
You can’t perform that action at this time.
0 commit comments