From d28506e11518a7075066e63be0d8be86465f1276 Mon Sep 17 00:00:00 2001 From: Thomas Dohmke Date: Sat, 4 Jan 2025 16:43:59 -0800 Subject: [PATCH] fix Swiftlint warnings --- Hadge/Controllers/LoginViewController.swift | 6 +++--- Hadge/Controllers/SettingsViewController.swift | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Hadge/Controllers/LoginViewController.swift b/Hadge/Controllers/LoginViewController.swift index 3c64387..dda4602 100644 --- a/Hadge/Controllers/LoginViewController.swift +++ b/Hadge/Controllers/LoginViewController.swift @@ -37,12 +37,12 @@ class LoginViewController: EntireViewController { @IBAction func enterToken(_ sender: Any) { let alertController = UIAlertController(title: "Use a Personal Access Token", message: "This option is only available for debugging purposes and will be removed from the release build.", preferredStyle: .alert) - let saveAction = UIAlertAction(title: "Save", style: .default, handler: { _ -> Void in + let saveAction = UIAlertAction(title: "Save", style: .default, handler: { _ in let textField = alertController.textFields![0] as UITextField GitHub.shared().storeToken(token: textField.text!) }) - let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: { _ -> Void in }) - alertController.addTextField { (textField: UITextField!) -> Void in + let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: { _ in }) + alertController.addTextField { (textField: UITextField!) in textField.isSecureTextEntry = true textField.placeholder = "Paste your Token here" } diff --git a/Hadge/Controllers/SettingsViewController.swift b/Hadge/Controllers/SettingsViewController.swift index 322da15..9cdf260 100644 --- a/Hadge/Controllers/SettingsViewController.swift +++ b/Hadge/Controllers/SettingsViewController.swift @@ -37,10 +37,6 @@ class SettingsViewController: EntireTableViewController { var aboutHelper = SettingsAboutHelper() var syncHelper = SettingsSyncHelper() - override func viewDidLoad() { - super.viewDidLoad() - } - deinit { NotificationCenter.default.removeObserver(self) }