Skip to content

Commit

Permalink
WIP refactor title of news/event details screen
Browse files Browse the repository at this point in the history
  • Loading branch information
matax87 committed Dec 6, 2024
1 parent 24be6e8 commit bf312fa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ private extension AppCoordinator {
guard let topViewController
else { return }

// TODO: remove after title refactor
func configureBindings(
viewModel: NewsDetailsViewModel,
pageViewController: NewsPageViewController
Expand Down Expand Up @@ -254,6 +255,7 @@ private extension AppCoordinator {
return pageVC
}()

// TODO: remove after title refactor
configureBindings(
viewModel: viewModel,
pageViewController: pageVC
Expand Down Expand Up @@ -314,6 +316,7 @@ private extension AppCoordinator {
guard let topViewController
else { return }

// TODO: move set navigationItem title here
func configureBindings(
viewModel: EventDetailsViewModel,
pageViewController: EventPageViewController
Expand Down Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ final class EventPageViewController: BasePageViewController<EventDetailsViewMode
guard let self
else { return }

// TODO: move set navigationItem title here

self.show(content: self.makeResultContent(for: event))
}
.store(in: &subscriptions)
Expand Down
3 changes: 2 additions & 1 deletion NOICommunity/NewsFeature/Coordinators/NewsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ private extension NewsCoordinator {
pageVC.askQuestionActionHandler = { [weak self] in
self?.showAskAQuestion(for: $0)
}


// TODO: move set navigationItem title here
pageVC.navigationItem.title = localizedValue(
from: news.languageToDetails
)?
Expand Down

0 comments on commit bf312fa

Please sign in to comment.