Skip to content

Commit

Permalink
[iOS/#368] 친구 언팔로우하면 dismiss 안되던 버그 수정 (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
leemhyungyu authored Dec 7, 2023
1 parent 297abc9 commit 6e8cde2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ private extension ChartViewController {
viewModel: ChartViewModel(
chartUseCase: DefaultChartUseCase(
repository: DefaultChartRepository(
provider: Provider(urlSession: URLSession.shared))), actions: nil))
provider: Provider(
urlSession: URLSession.shared))),
actions: nil))
let hostingController = UIHostingController(rootView: dailyChartView)
addChild(hostingController)
guard let newChartView = hostingController.view else { return }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,22 @@ final class SocialFlowCoordinator: Coordinator {

private func showFreindAddViewController() {
let actions = FriendAddViewModelActions(
didCancleFriendAdd: didTapCancelNavigationButton,
didSuccessFriendAdd: didTapCancelNavigationButton)
didCancleFriendAdd: dismissNavigationController,
didSuccessFriendAdd: dismissNavigationController)
let freindAddViewContorller = dependencies.makeFriendAddViewController(actions: actions)
let firendNavigationController = UINavigationController(rootViewController: freindAddViewContorller)
firendNavigationController.modalPresentationStyle = .fullScreen
navigationController?.present(firendNavigationController, animated: true)
}

private func didTapCancelNavigationButton() {
private func dismissNavigationController() {
navigationController?.dismiss(animated: true)
}

func showSocialDetailViewController(friend: Friend) {
let actions = SocialDetailViewModelActions(didCancelSocialDetail: didTapCancelNavigationButton, didFinishUnfollow: didFinishUnfollow)
let actions = SocialDetailViewModelActions(
didCancelSocialDetail: dismissNavigationController,
didFinishUnfollow: dismissNavigationController)
let socialDetailViewController = dependencies.makeSocialDetailViewController(actions: actions, friend: friend)
let socialDetailNavigationController = UINavigationController(rootViewController: socialDetailViewController)
socialDetailNavigationController.modalPresentationStyle = .fullScreen
Expand All @@ -61,8 +63,4 @@ final class SocialFlowCoordinator: Coordinator {
let myPageViewController = dependencies.makeMyPageViewController()
navigationController?.pushViewController(myPageViewController, animated: true)
}

func didFinishUnfollow() {
navigationController?.popViewController(animated: true)
}
}

0 comments on commit 6e8cde2

Please sign in to comment.