From bf312fa7f465e5f18f7d1b5093a79607a354de1a Mon Sep 17 00:00:00 2001 From: Matteo Matassoni <4108197+matax87@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:32:30 +0100 Subject: [PATCH] WIP refactor title of news/event details screen --- .../Coordinator/Implementations/Custom/AppCoordinator.swift | 5 +++++ .../EventsFeature/Coordinators/EventsCoordinator.swift | 2 ++ .../View Controllers/EventPageViewController.swift | 2 ++ NOICommunity/NewsFeature/Coordinators/NewsCoordinator.swift | 3 ++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift b/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift index 70a75b8..2c7d3f9 100644 --- a/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift +++ b/NOICommunity/Coordinator/Implementations/Custom/AppCoordinator.swift @@ -205,6 +205,7 @@ private extension AppCoordinator { guard let topViewController else { return } + // TODO: remove after title refactor func configureBindings( viewModel: NewsDetailsViewModel, pageViewController: NewsPageViewController @@ -254,6 +255,7 @@ private extension AppCoordinator { return pageVC }() + // TODO: remove after title refactor configureBindings( viewModel: viewModel, pageViewController: pageVC @@ -314,6 +316,7 @@ private extension AppCoordinator { guard let topViewController else { return } + // TODO: move set navigationItem title here func configureBindings( viewModel: EventDetailsViewModel, pageViewController: EventPageViewController @@ -355,7 +358,9 @@ private extension AppCoordinator { self?.signupEvent($0, from: pageVC) } + // TODO: move set navigationItem title here pageVC.navigationItem.title = nil + pageVC.navigationItem.largeTitleDisplayMode = .never pageVC.navigationItem.leftBarButtonItem = UIBarButtonItem( image: UIImage(systemName: "xmark.circle.fill"), diff --git a/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift b/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift index edcd7f5..3924969 100644 --- a/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift +++ b/NOICommunity/EventsFeature/Coordinators/EventsCoordinator.swift @@ -121,7 +121,9 @@ private extension EventsCoordinator { self?.signupEvent($0) } + // TODO: remove after title refactor pageVC.navigationItem.title = event.title + pageVC.navigationItem.largeTitleDisplayMode = .never return pageVC diff --git a/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift b/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift index 77adff0..c36a0eb 100644 --- a/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift +++ b/NOICommunity/EventsFeature/View Controllers/EventPageViewController.swift @@ -68,6 +68,8 @@ final class EventPageViewController: BasePageViewController