Cap the possible destination index used during Feed moves

This commit is contained in:
Maurice Parker
2019-09-03 12:07:18 -05:00
parent d5adbccd5b
commit 2e71cc573d
2 changed files with 8 additions and 1 deletions

View File

@@ -269,7 +269,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
if proposedDestinationIndexPath.section == 0 {
return IndexPath(row: 0, section: 1)
}
return proposedDestinationIndexPath
return coordinator.cappedIndexPath(proposedDestinationIndexPath)
}()
guard let draggedNode = coordinator.nodeFor(sourceIndexPath), let destNode = coordinator.nodeFor(destIndexPath), let parentNode = destNode.parent else {