Change order of notification dismissal swipe action

This commit is contained in:
Shadowfacts 2019-09-19 22:09:17 -04:00
parent 9502944e62
commit 682d68fd81
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 2 deletions

View File

@ -160,11 +160,12 @@ class NotificationsTableViewController: EnhancedTableViewController {
let cellConfiguration = (tableView.cellForRow(at: indexPath) as? TableViewSwipeActionProvider)?.trailingSwipeActionsConfiguration() let cellConfiguration = (tableView.cellForRow(at: indexPath) as? TableViewSwipeActionProvider)?.trailingSwipeActionsConfiguration()
let config: UISwipeActionsConfiguration let config: UISwipeActionsConfiguration
if let cellConfiguration = cellConfiguration { if let cellConfiguration = cellConfiguration {
config = UISwipeActionsConfiguration(actions: [dismissAction] + cellConfiguration.actions) config = UISwipeActionsConfiguration(actions: cellConfiguration.actions + [dismissAction])
config.performsFirstActionWithFullSwipe = cellConfiguration.performsFirstActionWithFullSwipe
} else { } else {
config = UISwipeActionsConfiguration(actions: [dismissAction]) config = UISwipeActionsConfiguration(actions: [dismissAction])
config.performsFirstActionWithFullSwipe = false
} }
config.performsFirstActionWithFullSwipe = true
return config return config
} }