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.
|
// Based on the drop we have to determine a node to start looking for a parent container.
|
||||||
let destNode: Node? = {
|
let destNode: Node? = {
|
||||||
|
|
||||||
if destIndexPath.row == 0 {
|
if isFolderDrop {
|
||||||
|
return dataSource.itemIdentifier(for: destIndexPath)
|
||||||
return coordinator.rootNode.childAtIndex(destIndexPath.section)!
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if destIndexPath.row == 0 {
|
||||||
if isFolderDrop {
|
return coordinator.rootNode.childAtIndex(destIndexPath.section)!
|
||||||
return dataSource.itemIdentifier(for: destIndexPath)
|
} else if destIndexPath.row > 0 {
|
||||||
|
return dataSource.itemIdentifier(for: IndexPath(row: destIndexPath.row - 1, section: destIndexPath.section))
|
||||||
} else {
|
} else {
|
||||||
if destIndexPath.row > 0 {
|
return nil
|
||||||
return dataSource.itemIdentifier(for: IndexPath(row: destIndexPath.row - 1, section: destIndexPath.section))
|
|
||||||
} else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Now we start looking for the parent container
|
// Now we start looking for the parent container
|
||||||
|
Loading…
x
Reference in New Issue
Block a user