Skip to content

Commit

Permalink
reverting partial change and adding comment to explain what needs to …
Browse files Browse the repository at this point in the history
…happen
  • Loading branch information
g-Off committed Apr 9, 2019
1 parent 403da96 commit 7950466
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -190,6 +190,12 @@ extension FunctionalTableData {
// required
}

public func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle {
let cellConfig = sections[indexPath]
// FIXME: This is a temporary revert of a semi-breaking change. Having actions associated with row shouldn't dictate if the delete action is available when the UITableView is in edit mode. Having a `canDelete` property, or a `deleteAction` would better serve the intent here
return cellConfig?.actions.leadingActionConfiguration != nil || cellConfig?.actions.trailingActionConfiguration != nil ? .delete : .none
}

public func tableView(_ tableView: UITableView, shouldIndentWhileEditingRowAt indexPath: IndexPath) -> Bool {
return false
}
Expand Down

0 comments on commit 7950466

Please sign in to comment.