From fda8df70dd53047a0ede4f8dcbd7f6411f3e3f76 Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Mon, 9 Mar 2020 08:30:05 +0100 Subject: [PATCH] Remove now unused password flavor action sheet --- .../PasswordEditorTableViewController.swift | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/pass/Controllers/PasswordEditorTableViewController.swift b/pass/Controllers/PasswordEditorTableViewController.swift index c237b4f..bc54a69 100644 --- a/pass/Controllers/PasswordEditorTableViewController.swift +++ b/pass/Controllers/PasswordEditorTableViewController.swift @@ -255,8 +255,6 @@ class PasswordEditorTableViewController: UITableViewController { self.present(alert, animated: true, completion: nil) } else if selectedCell == scanQRCodeCell { self.performSegue(withIdentifier: "showQRScannerSegue", sender: self) - } else if selectedCell == passwordFlavorCell { - showPasswordGeneratorFlavorActionSheet(sourceCell: selectedCell!, tableView: tableView) } } @@ -264,33 +262,6 @@ class PasswordEditorTableViewController: UITableViewController { super.viewWillDisappear(animated) Defaults.passwordGenerator = passwordGenerator } - - private func showPasswordGeneratorFlavorActionSheet(sourceCell: UITableViewCell, tableView: UITableView) { - let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) - - PasswordGeneratorFlavor.allCases.forEach { flavor in - var actionTitle = flavor.longNameLocalized - if passwordGenerator.flavor == flavor { - actionTitle = "✓ " + actionTitle - } - let action = UIAlertAction(title: actionTitle, style: .default) { _ in - guard self.passwordGenerator.flavor != flavor else { - return - } - self.passwordGenerator.flavor = flavor - sourceCell.detailTextLabel?.text = self.passwordGenerator.flavor.localized - self.updateTableData(withRespectTo: flavor) - tableView.reloadSections([self.passwordSection], with: .none) - } - optionMenu.addAction(action) - } - - let cancelAction = UIAlertAction(title: "Cancel".localize(), style: .cancel, handler: nil) - optionMenu.addAction(cancelAction) - optionMenu.popoverPresentationController?.sourceView = sourceCell - - self.present(optionMenu, animated: true, completion: nil) - } private func updateTableData(withRespectTo flavor: PasswordGeneratorFlavor) { // Remove delimiter configuration for XKCD style passwords. Re-add it for random ones.