Merge pull request #1102 from philviso/DestructiveDeleteAction

iOS: Made context menu delete action destructive
This commit is contained in:
Maurice Parker 2019-10-06 16:32:55 -05:00 committed by GitHub
commit afa54e0382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -829,7 +829,8 @@ private extension MasterFeedViewController {
func deleteAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Delete", comment: "Delete")
let action = UIAction(title: title, image: AppAssets.trashImage) { [weak self] action in
let action = UIAction(title: title, image: AppAssets.trashImage, attributes: .destructive) { [weak self] action in
self?.delete(indexPath: indexPath)
}
return action
@ -860,7 +861,7 @@ private extension MasterFeedViewController {
return nil
}
let title = NSLocalizedString("Get Info", comment: "Get Infor")
let title = NSLocalizedString("Get Info", comment: "Get Info")
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
self?.coordinator.showFeedInspector(for: feed)
completionHandler(true)