Skip to content

Commit

Permalink
⚡️ :: present -> navigateTo
Browse files Browse the repository at this point in the history
  • Loading branch information
parkdoyeon1 committed Mar 5, 2024
1 parent 71a9ebe commit ae3441e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Projects/Flow/Sources/ChatFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public final class ChatFlow: Flow {
guard let step = step as? ChatStep else { return .none }
switch step {
case .chatIsRequired:
return presentChat()
return navigateToChat()
}
}
}

extension ChatFlow {
private func presentChat() -> FlowContributors {
private func navigateToChat() -> FlowContributors {
let chatViewController = container.resolve(ChatViewController.self)!
self.rootViewController.pushViewController(chatViewController, animated: false)
return .one(flowContributor: .contribute(
Expand Down
4 changes: 2 additions & 2 deletions Projects/Flow/Sources/FriendsFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public final class FriendsFlow: Flow {
guard let step = step as? FriendsStep else { return .none }
switch step {
case .friendsIsRequired:
return presentFriends()
return navigateToFriends()
}
}
}

extension FriendsFlow {
private func presentFriends() -> FlowContributors {
private func navigateToFriends() -> FlowContributors {
let friendsViewController = container.resolve(FriendsViewController.self)!
self.rootViewController.pushViewController(friendsViewController, animated: false)
return .one(flowContributor: .contribute(
Expand Down
4 changes: 2 additions & 2 deletions Projects/Flow/Sources/StoreFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public final class StoreFlow: Flow {
guard let step = step as? StoreStep else { return .none }
switch step {
case .storeIsRequired:
return presentStore()
return navigateToStore()
}
}
}

extension StoreFlow {
private func presentStore() -> FlowContributors {
private func navigateToStore() -> FlowContributors {
let storeViewController = container.resolve(StoreViewController.self)!
self.rootViewController.pushViewController(storeViewController, animated: false)
return .one(flowContributor: .contribute(
Expand Down
4 changes: 2 additions & 2 deletions Projects/Flow/Sources/TabsFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public final class TabsFlow: Flow {
guard let step = step as? AppStep else { return .none }
switch step {
case .tabIsRequired:
return presentTabs()
return navigateToTabs()
default:
return .none
}
}
// swiftlint: disable function_body_length
private func presentTabs() -> FlowContributors {
private func navigateToTabs() -> FlowContributors {
let chatFlow = ChatFlow(container: container)
let friendsFlow = FriendsFlow(container: container)
let storeFlow = StoreFlow(container: container)
Expand Down

0 comments on commit ae3441e

Please sign in to comment.