diff --git a/SOPT-iOS/Projects/Data/Sources/Repository/SettingRepository.swift b/SOPT-iOS/Projects/Data/Sources/Repository/SettingRepository.swift index ba4442f59..772257611 100644 --- a/SOPT-iOS/Projects/Data/Sources/Repository/SettingRepository.swift +++ b/SOPT-iOS/Projects/Data/Sources/Repository/SettingRepository.swift @@ -48,6 +48,10 @@ extension SettingRepository: SettingRepositoryInterface { return userService.changeNickname(nickname: nickname) .map { _ in true } .replaceError(with: false) + .handleEvents(receiveOutput: { isSuccessed in + guard isSuccessed else { return } + UserDefaultKeyList.User.soptampName = nickname + }) .eraseToAnyPublisher() } diff --git a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/VC/MainVC.swift b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/VC/MainVC.swift index ca005c13e..e17ac5b3d 100644 --- a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/VC/MainVC.swift +++ b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/VC/MainVC.swift @@ -120,9 +120,11 @@ extension MainVC { self.collectionView.register(AppServiceCVC.self, forCellWithReuseIdentifier: AppServiceCVC.className) } - private func pushSoptampFeature() { + private func presentSoptampFeature() { let vc = factory.makeMissionListVC(sceneType: .default).viewController - navigationController?.pushViewController(vc, animated: true) + let nav = UINavigationController(rootViewController: vc) + nav.modalPresentationStyle = .fullScreen + present(nav, animated: true) } private func pushSettingFeature() { @@ -140,10 +142,9 @@ extension MainVC { extension MainVC: UICollectionViewDelegate { public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - // TODO: - 디버깅을 위한 임시 솝탬프 피쳐 연결 if indexPath.section == 3 { guard viewModel.userType != .visitor else { return } - pushSoptampFeature() + presentSoptampFeature() } } } diff --git a/SOPT-iOS/Projects/SOPT-iOS/Sources/Application/SceneDelegate.swift b/SOPT-iOS/Projects/SOPT-iOS/Sources/Application/SceneDelegate.swift index e2bac3b70..556124eba 100644 --- a/SOPT-iOS/Projects/SOPT-iOS/Sources/Application/SceneDelegate.swift +++ b/SOPT-iOS/Projects/SOPT-iOS/Sources/Application/SceneDelegate.swift @@ -24,7 +24,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window = UIWindow(frame: scene.coordinateSpace.bounds) window?.windowScene = scene // let rootVC = container.makeShowAttendanceVC().viewController - let rootVC = container.makeSettingVC().viewController + let rootVC = container.makeMainVC(userType: .active).viewController window?.rootViewController = UINavigationController(rootViewController: rootVC) window?.makeKeyAndVisible() }