Skip to content

Commit

Permalink
chore: fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdrobne committed Jul 24, 2024
1 parent 56508d1 commit 3da612f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/SwiftUICoordinator/Navigator/Navigator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ public extension Navigator where Self: RouterViewFactory {

func set(routes: [Route], animated: Bool = true) {
let views = views(for: routes)
navigationController.isNavigationBarHidden = routes.last?.title == nil && routes.last?.hidesNavigationBar ?? true
let hidesNavigationBar = routes.last?.hidesNavigationBar ?? true
navigationController.isNavigationBarHidden = routes.last?.title == nil && hidesNavigationBar
navigationController.setViewControllers(views, animated: animated)
}

func append(routes: [Route], animated: Bool = true) {
let views = views(for: routes)
navigationController.isNavigationBarHidden = routes.last?.title == nil && routes.last?.hidesNavigationBar ?? true
let hidesNavigationBar = routes.last?.hidesNavigationBar ?? true
navigationController.isNavigationBarHidden = routes.last?.title == nil && hidesNavigationBar
navigationController.setViewControllers(self.viewControllers + views, animated: animated)
}

Expand Down

0 comments on commit 3da612f

Please sign in to comment.