From 6c86e4bb4c353cf58c52913373d272deae4462ef Mon Sep 17 00:00:00 2001 From: Matteo Matassoni <4108197+matax87@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:33:24 +0100 Subject: [PATCH] Refactor event/news details configuration --- .../Coordinator/Implementations/Custom/AppCoordinator.swift | 5 +---- .../EventsFeature/Coordinators/EventsCoordinator.swift | 3 --- .../View Controllers/EventPageViewController.swift | 1 + NOICommunity/NewsFeature/Coordinators/NewsCoordinator.swift | 3 --- .../View Controllers/NewsPageViewController.swift | 1 + 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift b/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift index 2958c37..e40b757 100644 --- a/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift +++ b/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift @@ -226,8 +226,6 @@ private extension AppCoordinator { self?.showNewsAskAQuestion(for: $0, from: pageVC) } - pageVC.navigationItem.title = nil - pageVC.navigationItem.largeTitleDisplayMode = .never pageVC.navigationItem.leftBarButtonItem = UIBarButtonItem( image: UIImage(systemName: "xmark.circle.fill"), primaryAction: UIAction { [weak pageVC] _ in @@ -320,8 +318,7 @@ private extension AppCoordinator { self?.signupEvent($0, from: pageVC) } - pageVC.navigationItem.title = nil - pageVC.navigationItem.largeTitleDisplayMode = .never + pageVC.navigationItem.leftBarButtonItem = UIBarButtonItem( image: UIImage(systemName: "xmark.circle.fill"), primaryAction: UIAction { [weak pageVC] _ in diff --git a/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift b/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift index 5a17835..94d43f9 100644 --- a/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift +++ b/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift @@ -120,9 +120,6 @@ private extension EventsCoordinator { pageVC.signupActionHandler = { [weak self] in self?.signupEvent($0) } - - pageVC.navigationItem.largeTitleDisplayMode = .never - return pageVC }() navigationController.pushViewController(pageVC, animated: true) diff --git a/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift b/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift index 5a60d14..21d45b6 100644 --- a/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift +++ b/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift @@ -85,6 +85,7 @@ final class EventPageViewController: BasePageViewController override func configureLayout() { super.configureLayout() + navigationItem.largeTitleDisplayMode = .never embedChild(containerViewController) }