Fix folder drops that sometimes defaulted to the account. Issue #1356
This commit is contained in:
parent
59e512a263
commit
19336dd07e
|
@ -56,24 +56,18 @@ extension MasterFeedViewController: UITableViewDropDelegate {
|
|||
// Based on the drop we have to determine a node to start looking for a parent container.
|
||||
let destNode: Node? = {
|
||||
|
||||
if destIndexPath.row == 0 {
|
||||
|
||||
return coordinator.rootNode.childAtIndex(destIndexPath.section)!
|
||||
|
||||
} else {
|
||||
|
||||
if isFolderDrop {
|
||||
return dataSource.itemIdentifier(for: destIndexPath)
|
||||
} else {
|
||||
if destIndexPath.row > 0 {
|
||||
if destIndexPath.row == 0 {
|
||||
return coordinator.rootNode.childAtIndex(destIndexPath.section)!
|
||||
} else if destIndexPath.row > 0 {
|
||||
return dataSource.itemIdentifier(for: IndexPath(row: destIndexPath.row - 1, section: destIndexPath.section))
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}()
|
||||
|
||||
// Now we start looking for the parent container
|
||||
|
|
Loading…
Reference in New Issue