Prechádzať zdrojové kódy

added debugToolkit option to advanced settings alert

nayooti 5 rokov pred
rodič
commit
c6ecec85cc

+ 2 - 0
deltachat-ios/Controller/SettingsController.swift

@@ -413,6 +413,8 @@ internal final class SettingsViewController: UITableViewController {
             UserDefaults.standard.set(!locationStreaming, forKey: "location_streaming")
         }))
 
+        let logAction = UIAlertAction(title: String.localized("pref_view_log"), style: .default, handler: { [unowned self] _ in self.coordinator?.showDebugToolkit()})
+        alert.addAction(logAction)
         alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
         present(alert, animated: true, completion: nil)
     }

+ 6 - 0
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -321,6 +321,12 @@ class SettingsCoordinator: Coordinator {
         let helpViewController = HelpViewController()
         navigationController.pushViewController(helpViewController, animated: true)
     }
+
+    func showDebugToolkit() {
+        let vc = UIViewController()
+        vc.view.backgroundColor = .red
+        navigationController.present(vc, animated: true, completion: nil)
+    }
 }
 
 class EditSettingsCoordinator: Coordinator {