From 38ec1c0abc3faae3ba7abf4339dd6ec3f5d2405f Mon Sep 17 00:00:00 2001 From: HELLOHIDI Date: Thu, 15 Aug 2024 23:53:27 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor/#84]=20Combine=20=ED=99=9C=EC=9A=A9?= =?UTF-8?q?=ED=95=B4=EC=84=9C=20=EC=84=9C=EB=B2=84=ED=86=B5=EC=8B=A0=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DIContainer.swift | 0 .../MyFeature/MyPageButtonType.swift | 2 +- .../MyFeature/MyPageButton_Refactor.swift | 2 +- .../MyFeature/MyPageViewModel_Refactor.swift | 3 +-- .../MyFeature/MyPageView_Refactor.swift | 3 --- .../Service/API/AuthAPI.swift | 0 .../Service/API/UserAPI.swift | 0 .../Service/Foundation/APIError.swift | 0 .../Service/Foundation/BaseAPI.swift | 0 .../Service/Foundation/BaseEntity.swift | 0 .../Service/Foundation/BaseService.swift | 0 .../Service/Foundation/CancelBag.swift | 0 .../Service/Foundation/ErrorResponse.swift | 0 .../Service/Foundation/OPAPIError.swift | 0 .../Service/Service/AuthService.swift | 0 .../Service/Service/UserService.swift | 0 .../Service/Services.swift | 0 17 files changed, 3 insertions(+), 7 deletions(-) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/DIContainer.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/MyFeature/MyPageButtonType.swift (97%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/MyFeature/MyPageButton_Refactor.swift (96%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/MyFeature/MyPageViewModel_Refactor.swift (96%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/MyFeature/MyPageView_Refactor.swift (99%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/API/AuthAPI.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/API/UserAPI.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/APIError.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/BaseAPI.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/BaseEntity.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/BaseService.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/CancelBag.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/ErrorResponse.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Foundation/OPAPIError.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Service/AuthService.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Service/UserService.swift (100%) rename HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/{Refactor_MyFeature => Refactor_MyFeature_Combine}/Service/Services.swift (100%) diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/DIContainer.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/DIContainer.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/DIContainer.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/DIContainer.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageButtonType.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageButtonType.swift similarity index 97% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageButtonType.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageButtonType.swift index 7016516d..702448d2 100644 --- a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageButtonType.swift +++ b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageButtonType.swift @@ -11,7 +11,7 @@ import Foundation import DSKit import UIKit -public enum MyPageButtonType { +enum MyPageButtonType_Refactor { case travel case market case term diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageButton_Refactor.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageButton_Refactor.swift similarity index 96% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageButton_Refactor.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageButton_Refactor.swift index 4b8d9d77..14a9f6a3 100644 --- a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageButton_Refactor.swift +++ b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageButton_Refactor.swift @@ -15,7 +15,7 @@ struct MyPageButton_Refactor: View { @ObservedObject var viewModel: MyPageViewModel_Refactor - var buttonType: MyPageButtonType + var buttonType: MyPageButtonType_Refactor var body: some View { ZStack { diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageViewModel_Refactor.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageViewModel_Refactor.swift similarity index 96% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageViewModel_Refactor.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageViewModel_Refactor.swift index 5e2d20a5..e05e2774 100644 --- a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageViewModel_Refactor.swift +++ b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageViewModel_Refactor.swift @@ -37,8 +37,7 @@ class MyPageViewModel_Refactor: ObservableObject { switch action { case .getUserData: container.services.userService.getUserData() - .sink { _ in - + .sink { _ in } receiveValue: { [weak self] data in self?.name = data.data?.name ?? "" self?.point = data.data?.point ?? 0 diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageView_Refactor.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageView_Refactor.swift similarity index 99% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageView_Refactor.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageView_Refactor.swift index 92c95fa4..20542a2d 100644 --- a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/MyFeature/MyPageView_Refactor.swift +++ b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/MyFeature/MyPageView_Refactor.swift @@ -14,11 +14,8 @@ public struct MyPageView_Refactor: View { @State private var isPresented: Bool = false - @StateObject var viewModel: MyPageViewModel_Refactor - - public var body: some View { VStack { Spacer() diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/API/AuthAPI.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/API/AuthAPI.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/API/AuthAPI.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/API/AuthAPI.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/API/UserAPI.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/API/UserAPI.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/API/UserAPI.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/API/UserAPI.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/APIError.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/APIError.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/APIError.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/APIError.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/BaseAPI.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/BaseAPI.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/BaseAPI.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/BaseAPI.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/BaseEntity.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/BaseEntity.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/BaseEntity.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/BaseEntity.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/BaseService.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/BaseService.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/BaseService.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/BaseService.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/CancelBag.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/CancelBag.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/CancelBag.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/CancelBag.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/ErrorResponse.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/ErrorResponse.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/ErrorResponse.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/ErrorResponse.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/OPAPIError.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/OPAPIError.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Foundation/OPAPIError.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Foundation/OPAPIError.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Service/AuthService.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Service/AuthService.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Service/AuthService.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Service/AuthService.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Service/UserService.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Service/UserService.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Service/UserService.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Service/UserService.swift diff --git a/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Services.swift b/HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Services.swift similarity index 100% rename from HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Services.swift rename to HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature_Combine/Service/Services.swift