From a604d9da9ff75d58edbcd663af26df0d3496de95 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 17:29:41 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[Feat]=20#339=20-=20Poke=20=EC=98=A8?= =?UTF-8?q?=EB=B3=B4=EB=94=A9=20=EB=8C=80=EC=83=81=20=ED=8C=8C=EC=95=85=20?= =?UTF-8?q?API=20=EC=84=A0=EC=96=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Data/Sources/Repository/MainRepository.swift | 5 ++++- .../Sources/Dependency/RegisterDependencies.swift | 3 ++- .../Modules/Networks/Sources/API/PokeAPI.swift | 5 ++++- .../Sources/Entity/PokeIsNewUserEntity.swift | 13 +++++++++++++ .../Networks/Sources/Service/PokeService.swift | 5 +++++ .../Sources/Dependency/RegisterDependencies.swift | 3 ++- 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 SOPT-iOS/Projects/Modules/Networks/Sources/Entity/PokeIsNewUserEntity.swift diff --git a/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift b/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift index 4c55ab3f6..6561ac20e 100644 --- a/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift +++ b/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift @@ -17,12 +17,15 @@ public class MainRepository { private let userService: UserService private let configService: ConfigService private let descriptionService: DescriptionService + private let pokeService: PokeService + private let cancelBag = CancelBag() - public init(userService: UserService, configService: ConfigService, descriptionService: DescriptionService) { + public init(userService: UserService, configService: ConfigService, descriptionService: DescriptionService, pokeService: PokeService) { self.userService = userService self.configService = configService self.descriptionService = descriptionService + self.pokeService = pokeService } } diff --git a/SOPT-iOS/Projects/Demo/Sources/Dependency/RegisterDependencies.swift b/SOPT-iOS/Projects/Demo/Sources/Dependency/RegisterDependencies.swift index b017d2088..af0f6e565 100644 --- a/SOPT-iOS/Projects/Demo/Sources/Dependency/RegisterDependencies.swift +++ b/SOPT-iOS/Projects/Demo/Sources/Dependency/RegisterDependencies.swift @@ -39,7 +39,8 @@ extension AppDelegate { MainRepository( userService: DefaultUserService(), configService: DefaultConfigService(), - descriptionService: DefaultDescriptionService() + descriptionService: DefaultDescriptionService(), + pokeService: DefaultPokeService() ) } ) diff --git a/SOPT-iOS/Projects/Modules/Networks/Sources/API/PokeAPI.swift b/SOPT-iOS/Projects/Modules/Networks/Sources/API/PokeAPI.swift index f328b923c..5a44333ea 100644 --- a/SOPT-iOS/Projects/Modules/Networks/Sources/API/PokeAPI.swift +++ b/SOPT-iOS/Projects/Modules/Networks/Sources/API/PokeAPI.swift @@ -13,6 +13,7 @@ import Moya import Core public enum PokeAPI { + case isNewUser case getWhoPokedToMe case getWhoPokedToMeList(pageIndex: String) case getFriend @@ -29,6 +30,8 @@ extension PokeAPI: BaseAPI { public var path: String { switch self { + case .isNewUser: + return "/new" case .getWhoPokedToMe: return "/to/me" case .getWhoPokedToMeList: @@ -50,7 +53,7 @@ extension PokeAPI: BaseAPI { public var method: Moya.Method { switch self { - case .getWhoPokedToMe, .getWhoPokedToMeList, .getFriend, .getFriendListWithRelation, .getFriendRandomUser, + case .isNewUser, .getWhoPokedToMe, .getWhoPokedToMeList, .getFriend, .getFriendListWithRelation, .getFriendRandomUser, .getFriendList, .getRandomUsers, .getPokeMessages: return .get case .poke: diff --git a/SOPT-iOS/Projects/Modules/Networks/Sources/Entity/PokeIsNewUserEntity.swift b/SOPT-iOS/Projects/Modules/Networks/Sources/Entity/PokeIsNewUserEntity.swift new file mode 100644 index 000000000..844c38dd8 --- /dev/null +++ b/SOPT-iOS/Projects/Modules/Networks/Sources/Entity/PokeIsNewUserEntity.swift @@ -0,0 +1,13 @@ +// +// PokeIsNewUserEntity.swift +// Networks +// +// Created by sejin on 12/27/23. +// Copyright © 2023 SOPT-iOS. All rights reserved. +// + +import Foundation + +public struct PokeIsNewUserEntity: Decodable { + public let isNew: Bool +} diff --git a/SOPT-iOS/Projects/Modules/Networks/Sources/Service/PokeService.swift b/SOPT-iOS/Projects/Modules/Networks/Sources/Service/PokeService.swift index b6cd536de..abee7e25b 100644 --- a/SOPT-iOS/Projects/Modules/Networks/Sources/Service/PokeService.swift +++ b/SOPT-iOS/Projects/Modules/Networks/Sources/Service/PokeService.swift @@ -14,6 +14,7 @@ import Moya public typealias DefaultPokeService = BaseService public protocol PokeService { + func isNewUser() -> AnyPublisher func getWhoPokedToMe() -> AnyPublisher func getWhoPokedToMeList(pageIndex: String) -> AnyPublisher func getFriend() -> AnyPublisher<[PokeUserEntity], Error> @@ -26,6 +27,10 @@ public protocol PokeService { } extension DefaultPokeService: PokeService { + public func isNewUser() -> AnyPublisher { + requestObjectInCombine(.isNewUser) + } + public func getWhoPokedToMe() -> AnyPublisher { requestObjectInCombine(.getWhoPokedToMe) } diff --git a/SOPT-iOS/Projects/SOPT-iOS/Sources/Dependency/RegisterDependencies.swift b/SOPT-iOS/Projects/SOPT-iOS/Sources/Dependency/RegisterDependencies.swift index b017d2088..af0f6e565 100644 --- a/SOPT-iOS/Projects/SOPT-iOS/Sources/Dependency/RegisterDependencies.swift +++ b/SOPT-iOS/Projects/SOPT-iOS/Sources/Dependency/RegisterDependencies.swift @@ -39,7 +39,8 @@ extension AppDelegate { MainRepository( userService: DefaultUserService(), configService: DefaultConfigService(), - descriptionService: DefaultDescriptionService() + descriptionService: DefaultDescriptionService(), + pokeService: DefaultPokeService() ) } ) From 9bb99b34a4fee63ab79c56f629ae22740f4fb4bd Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 17:54:48 +0900 Subject: [PATCH 2/7] =?UTF-8?q?[Refactor]=20#339=20-=20=EC=95=B1=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=20=ED=99=94=EB=A9=B4=20cell=20=ED=84=B0?= =?UTF-8?q?=EC=B9=98=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=A6=BC=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainScene/ViewModel/MainViewModel.swift | 89 +++++++++++-------- 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift index 1c425885c..e52e3a971 100644 --- a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift +++ b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift @@ -89,9 +89,30 @@ extension MainViewModel { }.store(in: cancelBag) input.cellTapped - .sink { [weak self] indexPath in - guard let self = self else { return } - self.bindCellAction(indexPath) + .filter { $0.section == 1 } + .map { $0.item } + .compactMap { [weak self] index in + self?.mainServiceList[index] + }.sink { [weak self] service in + self?.handleMainServiceSectionTap(with: service) + }.store(in: cancelBag) + + input.cellTapped + .filter { $0.section == 2 } + .map { $0.item } + .compactMap { [weak self] index in + self?.otherServiceList[index] + }.sink { [weak self] service in + self?.handleOtherServiceSectionTap(with: service) + }.store(in: cancelBag) + + input.cellTapped + .filter { $0.section == 3 } + .map { $0.item } + .compactMap { [weak self] index in + self?.appServiceList[index] + }.sink { [weak self] service in + self?.handleAppServiceSectionTap(with: service) }.store(in: cancelBag) input.requestUserInfo @@ -161,39 +182,35 @@ extension MainViewModel { }.store(in: self.cancelBag) } - private func bindCellAction(_ indexPath: IndexPath) { - switch (indexPath.section, indexPath.row) { - case (0, _): break - case (1, _): - guard let service = mainServiceList[safe: indexPath.item] else { return } - self.trackAmplitude(event: service.toAmplitudeEventType) - - guard service != .attendance else { - onAttendance?() - return - } - - let needOfficialProject = service == .project && userType == .visitor - let serviceDomainURL = needOfficialProject - ? ExternalURL.SOPT.project - : service.serviceDomainLink - onSafari?(serviceDomainURL) - case (2, _): - guard let service = otherServiceList[safe: indexPath.item] else { return } - self.trackAmplitude(event: service.toAmplitudeEventType) - - onSafari?(service.serviceDomainLink) - case(3, _): - guard userType != .visitor else { return } - guard let service = appServiceList[safe: indexPath.item] else { return } - self.trackAmplitude(event: service.toAmplitudeEventType) - switch service { - case .soptamp: onSoptamp?() - case .poke: - let isFirstVisitToPokeView = UserDefaultKeyList.User.isFirstVisitToPokeView - onPoke?(isFirstVisitToPokeView ?? true) - } - default: break + private func handleMainServiceSectionTap(with service: ServiceType) { + self.trackAmplitude(event: service.toAmplitudeEventType) + + guard service != .attendance else { + onAttendance?() + return + } + + let needOfficialProject = service == .project && userType == .visitor + let serviceDomainURL = needOfficialProject + ? ExternalURL.SOPT.project + : service.serviceDomainLink + onSafari?(serviceDomainURL) + } + + private func handleOtherServiceSectionTap(with service: ServiceType) { + self.trackAmplitude(event: service.toAmplitudeEventType) + + onSafari?(service.serviceDomainLink) + } + + private func handleAppServiceSectionTap(with service: AppServiceType) { + guard userType != .visitor else { return } + self.trackAmplitude(event: service.toAmplitudeEventType) + switch service { + case .soptamp: onSoptamp?() + case .poke: + // 온보딩 유저 분기 + onPoke?(true) } } From 12ef42806f3bcb50dd46903127580745145a317f Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 17:58:57 +0900 Subject: [PATCH 3/7] =?UTF-8?q?[Feat]=20#339=20-=20Poke=20=EC=98=A8?= =?UTF-8?q?=EB=B3=B4=EB=94=A9=20=EB=8C=80=EC=83=81=20=EC=97=AC=EB=B6=80?= =?UTF-8?q?=EB=A5=BC=20=EB=B0=9B=EC=95=84=EC=99=80=EC=84=9C=20=EB=B7=B0=20?= =?UTF-8?q?=EB=9D=BC=EC=9A=B0=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Repository/MainRepository.swift | 6 ++++++ .../MainRepositoryInterface.swift | 1 + .../Domain/Sources/UseCase/MainUseCase.swift | 17 ++++++++++++++++- .../MainScene/ViewModel/MainViewModel.swift | 8 ++++++-- .../ViewModel/PokeOnboardingViewModel.swift | 10 ++++------ 5 files changed, 33 insertions(+), 9 deletions(-) diff --git a/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift b/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift index 6561ac20e..ad47b3173 100644 --- a/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift +++ b/SOPT-iOS/Projects/Data/Sources/Repository/MainRepository.swift @@ -80,4 +80,10 @@ extension MainRepository: MainRepositoryInterface { } .eraseToAnyPublisher() } + + public func checkPokeNewUser() -> AnyPublisher { + pokeService.isNewUser() + .map { $0.isNew } + .eraseToAnyPublisher() + } } diff --git a/SOPT-iOS/Projects/Domain/Sources/RepositoryInterface/MainRepositoryInterface.swift b/SOPT-iOS/Projects/Domain/Sources/RepositoryInterface/MainRepositoryInterface.swift index 12070e051..44dc27d98 100644 --- a/SOPT-iOS/Projects/Domain/Sources/RepositoryInterface/MainRepositoryInterface.swift +++ b/SOPT-iOS/Projects/Domain/Sources/RepositoryInterface/MainRepositoryInterface.swift @@ -15,4 +15,5 @@ public protocol MainRepositoryInterface { func getServiceState() -> AnyPublisher func getMainViewDescription() -> AnyPublisher func registerPushToken(with token: String) -> AnyPublisher + func checkPokeNewUser() -> AnyPublisher } diff --git a/SOPT-iOS/Projects/Domain/Sources/UseCase/MainUseCase.swift b/SOPT-iOS/Projects/Domain/Sources/UseCase/MainUseCase.swift index fa5f0cda9..0cd12e0b7 100644 --- a/SOPT-iOS/Projects/Domain/Sources/UseCase/MainUseCase.swift +++ b/SOPT-iOS/Projects/Domain/Sources/UseCase/MainUseCase.swift @@ -15,10 +15,13 @@ public protocol MainUseCase { var serviceState: PassthroughSubject { get set } var mainDescription: PassthroughSubject { get set } var mainErrorOccurred: PassthroughSubject { get set } + var isPokeNewUser: PassthroughSubject { get set } + func getUserMainInfo() func getServiceState() func getMainViewDescription() func registerPushToken() + func checkPokeNewUser() } public class DefaultMainUseCase { @@ -30,6 +33,7 @@ public class DefaultMainUseCase { public var serviceState = PassthroughSubject() public var mainDescription = PassthroughSubject() public var mainErrorOccurred = PassthroughSubject() + public var isPokeNewUser = PassthroughSubject() public init(repository: MainRepositoryInterface) { self.repository = repository @@ -75,12 +79,23 @@ extension DefaultMainUseCase: MainUseCase { repository.registerPushToken(with: pushToken) .sink { event in - print("DefaultSplashUseCase : \(event)") + print("MainUseCase Register PushToken: \(event)") } receiveValue: { didSucceed in print("푸시 토큰 등록 결과: \(didSucceed)") }.store(in: cancelBag) } + public func checkPokeNewUser() { + repository.checkPokeNewUser() + .catch { [weak self] error in + print("MainUseCase CheckPokeNewUser Error: \(error)") + self?.mainErrorOccurred.send(.networkError(message: "Poke 온보딩 대상 여부 확인 실패")) + return Empty() + }.sink { [weak self] isNewUser in + self?.isPokeNewUser.send(isNewUser) + }.store(in: cancelBag) + } + private func setUserType(with userType: UserType?) { switch userType { case .none, .inactive: diff --git a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift index e52e3a971..388905039 100644 --- a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift +++ b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift @@ -180,6 +180,11 @@ extension MainViewModel { self.onNeedSignIn?() } }.store(in: self.cancelBag) + + useCase.isPokeNewUser + .sink { [weak self] isNewUser in + self?.onPoke?(isNewUser) + }.store(in: cancelBag) } private func handleMainServiceSectionTap(with service: ServiceType) { @@ -209,8 +214,7 @@ extension MainViewModel { switch service { case .soptamp: onSoptamp?() case .poke: - // 온보딩 유저 분기 - onPoke?(true) + useCase.checkPokeNewUser() } } diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift index 466b12e62..f7d35eb62 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift @@ -26,7 +26,7 @@ public final class PokeOnboardingViewModel: PokeOnboardingViewModelType { let randomAcquaintance = PassthroughSubject<[PokeUserModel], Never>() let pokedResult = PassthroughSubject() } - + public var onNaviBackTapped: (() -> Void)? public var onFirstVisitInOnboarding: (() -> Void)? public var onAvartarTapped: ((_ playgroundId: String) -> Void)? @@ -57,10 +57,8 @@ extension PokeOnboardingViewModel { .map { _ in UserDefaultKeyList.User.isFirstVisitToPokeView ?? true } .sink(receiveValue: { [weak self] isFirstVisit in guard isFirstVisit else { return } - -// UserDefaultKeyList.User.isFirstVisitToPokeView = false -// self?.onFirstVisitInOnboarding?() - self?.onFirstVisitInOnboarding?() + UserDefaultKeyList.User.isFirstVisitToPokeView = false + self?.onFirstVisitInOnboarding?() }).store(in: cancelBag) input.pokeButtonTapped @@ -77,7 +75,7 @@ extension PokeOnboardingViewModel { .sink(receiveValue: { [weak self] userModel in self?.onAvartarTapped?(String(describing: userModel.playgroundId)) }).store(in: cancelBag) - + input.pullToRefreshTriggered .withUnretained(self) .sink(receiveValue: { [weak self] _ in From 5bf9e828d82fced34c9dad7b2582ff440fa899aa Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 18:13:48 +0900 Subject: [PATCH 4/7] =?UTF-8?q?[Feat]=20#339=20-=20=EC=98=A8=EB=B3=B4?= =?UTF-8?q?=EB=94=A9=20=EB=8C=80=EC=83=81=20=EC=97=AC=EB=B6=80=EB=A5=BC=20?= =?UTF-8?q?=ED=8C=8C=EC=95=85=ED=95=98=EB=8A=94=20=EB=8F=99=EC=95=88=20Loa?= =?UTF-8?q?ding=20Indicator=20=EB=B7=B0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainScene/ViewModel/MainViewModel.swift | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift index 388905039..16abc22d7 100644 --- a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift +++ b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift @@ -106,13 +106,30 @@ extension MainViewModel { self?.handleOtherServiceSectionTap(with: service) }.store(in: cancelBag) - input.cellTapped + let appServiceSectionService = input.cellTapped + .filter { [weak self] _ in + guard let self else { return false } + return self.userType != .visitor + } .filter { $0.section == 3 } .map { $0.item } .compactMap { [weak self] index in - self?.appServiceList[index] - }.sink { [weak self] service in - self?.handleAppServiceSectionTap(with: service) + return self?.appServiceList[index] + }.eraseToAnyPublisher() + + appServiceSectionService.sink { [weak self] service in + self?.trackAmplitude(event: service.toAmplitudeEventType) + }.store(in: cancelBag) + + appServiceSectionService.filter { $0 == .soptamp } + .sink { [weak self] _ in + self?.onSoptamp?() + }.store(in: cancelBag) + + appServiceSectionService.filter { $0 == .poke } + .sink { [weak self] _ in + output.isLoading.send(true) + self?.useCase.checkPokeNewUser() }.store(in: cancelBag) input.requestUserInfo @@ -183,6 +200,7 @@ extension MainViewModel { useCase.isPokeNewUser .sink { [weak self] isNewUser in + output.isLoading.send(false) self?.onPoke?(isNewUser) }.store(in: cancelBag) } @@ -208,16 +226,6 @@ extension MainViewModel { onSafari?(service.serviceDomainLink) } - private func handleAppServiceSectionTap(with service: AppServiceType) { - guard userType != .visitor else { return } - self.trackAmplitude(event: service.toAmplitudeEventType) - switch service { - case .soptamp: onSoptamp?() - case .poke: - useCase.checkPokeNewUser() - } - } - private func requestAuthorizationForNotification() { guard self.userType != .visitor, UserDefaultKeyList.Auth.hasAccessToken(), From 69dafd1206d51288b7042be5bf80bc0ef389a3f1 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 18:18:17 +0900 Subject: [PATCH 5/7] =?UTF-8?q?[Fix]=20#339=20-=20=EB=B9=84=ED=99=9C?= =?UTF-8?q?=EB=8F=99=20=ED=9A=8C=EC=9B=90=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?Poke=20=ED=94=BC=EC=B3=90=EC=97=90=20=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EB=AA=BB=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=88=A8=EA=B8=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/MainScene/ViewModel/MainViewModel.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift index 16abc22d7..7aa161e80 100644 --- a/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift +++ b/SOPT-iOS/Projects/Features/MainFeature/Sources/MainScene/ViewModel/MainViewModel.swift @@ -253,12 +253,15 @@ extension MainViewModel { case .visitor: self.mainServiceList = [.officialHomepage, .review, .project] self.otherServiceList = [.instagram, .youtube, .faq] + self.appServiceList = [.poke, .soptamp] case .active: self.mainServiceList = [.attendance, .group, .playgroundCommunity] self.otherServiceList = [.member, .project, .officialHomepage] + self.appServiceList = [.poke, .soptamp] case .inactive: self.mainServiceList = [.playgroundCommunity, .group, .member] self.otherServiceList = [.project, .officialHomepage, .instagram, .youtube] + self.appServiceList = [.soptamp] } } From 3edb927f911f7127bbe583547227ba2133b9228b Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 19:56:02 +0900 Subject: [PATCH 6/7] =?UTF-8?q?[Fix]=20#339=20-=20Poke=20=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=EC=97=90=EC=84=9C=20Swipe=20back=EC=9D=B4=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift index 599cf4cee..01a01c2f5 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeMainScene/VC/PokeMainVC.swift @@ -104,6 +104,7 @@ public final class PokeMainVC: UIViewController, PokeMainViewControllable { public override func viewDidLoad() { super.viewDidLoad() self.setUI() + self.setDelegate() self.setStackView() self.setLayout() self.bindViewModel() @@ -118,6 +119,10 @@ extension PokeMainVC { view.backgroundColor = DSKitAsset.Colors.semanticBackground.color } + private func setDelegate() { + self.navigationController?.interactivePopGestureRecognizer?.delegate = self + } + private func setStackView() { self.contentStackView.addArrangedSubviews(pokedSectionGroupView, friendSectionGroupView, From 90b48671c2462e1cdfe8de7e377663d00aa7687e Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Wed, 27 Dec 2023 20:57:21 +0900 Subject: [PATCH 7/7] =?UTF-8?q?[Feat]=20#339=20-=20=EC=98=A8=EB=B3=B4?= =?UTF-8?q?=EB=94=A9=20=EB=B7=B0=20=EC=B2=AB=20=EB=B0=A9=EB=AC=B8=20?= =?UTF-8?q?=ED=94=8C=EB=9E=98=EA=B7=B8=20=EB=B3=80=EC=88=98=EB=AA=85=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Projects/Core/Sources/Literals/UserDefaultKeyLIst.swift | 2 +- .../ViewModel/PokeOnboardingViewModel.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SOPT-iOS/Projects/Core/Sources/Literals/UserDefaultKeyLIst.swift b/SOPT-iOS/Projects/Core/Sources/Literals/UserDefaultKeyLIst.swift index f29b6512f..b89b6f087 100644 --- a/SOPT-iOS/Projects/Core/Sources/Literals/UserDefaultKeyLIst.swift +++ b/SOPT-iOS/Projects/Core/Sources/Literals/UserDefaultKeyLIst.swift @@ -22,7 +22,7 @@ public struct UserDefaultKeyList { @UserDefaultWrapper(key: "sentence") public static var sentence @UserDefaultWrapper(key: "soptampName") public static var soptampName @UserDefaultWrapper(key: "pushToken") public static var pushToken - @UserDefaultWrapper(key: "isFirstVisitToPokeView") public static var isFirstVisitToPokeView + @UserDefaultWrapper(key: "isFirstVisitToPokeView") public static var isFirstVisitToPokeOnboardingView } public struct AppNotice { diff --git a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift index f7d35eb62..1c0c7fc97 100644 --- a/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift +++ b/SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeOnboardingScene/ViewModel/PokeOnboardingViewModel.swift @@ -54,10 +54,10 @@ extension PokeOnboardingViewModel { }).store(in: cancelBag) input.viewDidLoaded - .map { _ in UserDefaultKeyList.User.isFirstVisitToPokeView ?? true } + .map { _ in UserDefaultKeyList.User.isFirstVisitToPokeOnboardingView ?? true } .sink(receiveValue: { [weak self] isFirstVisit in guard isFirstVisit else { return } - UserDefaultKeyList.User.isFirstVisitToPokeView = false + UserDefaultKeyList.User.isFirstVisitToPokeOnboardingView = false self?.onFirstVisitInOnboarding?() }).store(in: cancelBag)