From dfcda1f1dab1199ae0f50a1cf8bb30bcd9acc1e2 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Wed, 28 Jun 2023 18:47:24 +0200 Subject: [PATCH] Show general-settings (IOS-14) --- Mastodon/Scene/Settings/SettingsCoordinator.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Mastodon/Scene/Settings/SettingsCoordinator.swift b/Mastodon/Scene/Settings/SettingsCoordinator.swift index 93e66bc85..3ef087b16 100644 --- a/Mastodon/Scene/Settings/SettingsCoordinator.swift +++ b/Mastodon/Scene/Settings/SettingsCoordinator.swift @@ -35,6 +35,7 @@ class SettingsCoordinator: NSObject, Coordinator { } } +//MARK: - SettingsViewControllerDelegate extension SettingsCoordinator: SettingsViewControllerDelegate { func done(_ viewController: UIViewController) { viewController.dismiss(animated: true) @@ -43,8 +44,10 @@ extension SettingsCoordinator: SettingsViewControllerDelegate { func didSelect(_ viewController: UIViewController, entry: SettingsEntry) { switch entry { case .general: - break - // show general + let generalSettingsViewController = GeneralSettingsViewController() + generalSettingsViewController.delegate = self + + navigationController.pushViewController(generalSettingsViewController, animated: true) case .notifications: break // show notifications @@ -62,6 +65,7 @@ extension SettingsCoordinator: SettingsViewControllerDelegate { } } +//MARK: - AboutViewControllerDelegate extension SettingsCoordinator: AboutViewControllerDelegate { func didSelect(_ viewController: AboutViewController, entry: AboutSettingsEntry) { switch entry { @@ -88,8 +92,14 @@ extension SettingsCoordinator: AboutViewControllerDelegate { } } +//MARK: - ASWebAuthenticationPresentationContextProviding extension SettingsCoordinator: ASWebAuthenticationPresentationContextProviding { func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor { return navigationController.view.window! } } + +//MARK: - GeneralSettingsViewControllerDelegate +extension SettingsCoordinator: GeneralSettingsViewControllerDelegate { + +}