Made delete action destructive

This commit is contained in:
Phil Viso 2019-10-04 22:03:31 -05:00
parent b3a5929d6d
commit 50250c13de
1 changed files with 3 additions and 2 deletions

View File

@ -829,7 +829,8 @@ private extension MasterFeedViewController {
func deleteAction(indexPath: IndexPath) -> UIAction { func deleteAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Delete", comment: "Delete") 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) self?.delete(indexPath: indexPath)
} }
return action return action
@ -860,7 +861,7 @@ private extension MasterFeedViewController {
return nil 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 let action = UIAlertAction(title: title, style: .default) { [weak self] action in
self?.coordinator.showFeedInspector(for: feed) self?.coordinator.showFeedInspector(for: feed)
completionHandler(true) completionHandler(true)