From 084654d11b133e44c189363820810bc8d696407e Mon Sep 17 00:00:00 2001 From: Sunghun Kim <81547954+kimsh153@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:05:41 +0900 Subject: [PATCH 1/3] =?UTF-8?q?:sparkles:=20[#271]=20FilterFeature=20/=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=81=9D=EB=82=9C=20=ED=9B=84=20=EB=A6=AC?= =?UTF-8?q?=ED=94=84=EB=A0=88=EC=89=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/App/Sources/Application/NeedleGenerated.swift | 2 +- .../Feature/MainFeature/Sources/Intent/MainIntent.swift | 8 ++++++++ .../Feature/MyPageFeature/Interface/MyPageDelegate.swift | 1 + .../MyPageFeature/Sources/Intent/MyPageIntent.swift | 1 + Projects/Feature/RootFeature/Project.swift | 3 ++- .../Feature/RootFeature/Sources/Intent/RootIntent.swift | 7 +++++++ .../RootFeature/Sources/Intent/RootIntentProtocol.swift | 3 ++- 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Projects/App/Sources/Application/NeedleGenerated.swift b/Projects/App/Sources/Application/NeedleGenerated.swift index 1aa2091c..ea73b906 100644 --- a/Projects/App/Sources/Application/NeedleGenerated.swift +++ b/Projects/App/Sources/Application/NeedleGenerated.swift @@ -620,7 +620,7 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi #if !NEEDLE_DYNAMIC -@inline(never) private func register1() { +private func register1() { registerProviderFactory("^->AppComponent->JwtStoreComponent", factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5) registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider) registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider) diff --git a/Projects/Feature/MainFeature/Sources/Intent/MainIntent.swift b/Projects/Feature/MainFeature/Sources/Intent/MainIntent.swift index 11dbda20..7a708753 100644 --- a/Projects/Feature/MainFeature/Sources/Intent/MainIntent.swift +++ b/Projects/Feature/MainFeature/Sources/Intent/MainIntent.swift @@ -1,4 +1,5 @@ import FilterFeatureInterface +import MyPageFeatureInterface import Combine import MainFeatureInterface import StudentDomainInterface @@ -99,5 +100,12 @@ extension MainIntent: FilterDelegate { func filterDidCompleted(filterOption: FilterOptionDTO?) { model?.updateFilterOption(filterOpion: .init(dto: filterOption ?? .init())) model?.updatePage(page: 1) + self.refresh(filterOption: .init(dto: filterOption ?? .init())) + } +} + +extension MainIntent: MyPageDelegate { + func completeModify() { + self.refresh(filterOption: .init(dto: .init())) } } diff --git a/Projects/Feature/MyPageFeature/Interface/MyPageDelegate.swift b/Projects/Feature/MyPageFeature/Interface/MyPageDelegate.swift index cc674d30..d38cfff9 100644 --- a/Projects/Feature/MyPageFeature/Interface/MyPageDelegate.swift +++ b/Projects/Feature/MyPageFeature/Interface/MyPageDelegate.swift @@ -1,3 +1,4 @@ public protocol MyPageDelegate: AnyObject { func logout() + func completeModify() } diff --git a/Projects/Feature/MyPageFeature/Sources/Intent/MyPageIntent.swift b/Projects/Feature/MyPageFeature/Sources/Intent/MyPageIntent.swift index 6bce0507..72e68905 100644 --- a/Projects/Feature/MyPageFeature/Sources/Intent/MyPageIntent.swift +++ b/Projects/Feature/MyPageFeature/Sources/Intent/MyPageIntent.swift @@ -175,6 +175,7 @@ final class MyPageIntent: MyPageIntentProtocol { try await modifyInformationUseCase.execute(req: modifyInformationRequest) model?.updateIsLoading(isLoading: false) + myPageDelegate?.completeModify() } catch { model?.updateIsError(isError: true) model?.updateIsLoading(isLoading: false) diff --git a/Projects/Feature/RootFeature/Project.swift b/Projects/Feature/RootFeature/Project.swift index 56f4938f..6f392cf9 100644 --- a/Projects/Feature/RootFeature/Project.swift +++ b/Projects/Feature/RootFeature/Project.swift @@ -11,6 +11,7 @@ let project = Project.makeModule( .Feature.InputInformationFeatureInterface, .Feature.MainFeatureInterface, .Feature.SplashFeatureInterface, - .Feature.BaseFeature + .Feature.BaseFeature, + .Feature.MyPageFeatureInterface ] ) diff --git a/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift b/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift index f6382691..30c756ec 100644 --- a/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift +++ b/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift @@ -3,6 +3,7 @@ import InputInformationFeatureInterface import MainFeatureInterface import SigninFeatureInterface import SplashFeatureInterface +import MyPageFeatureInterface final class RootIntent: RootIntentProtocol { private weak var model: (any RootActionProtocol)? @@ -39,3 +40,9 @@ extension RootIntent: SplashDelegate { model?.updateSceneType(type: isLoggedIn ? .main : .signin) } } + +extension RootIntent: MyPageDelegate { + func completeModify() { + model?.updateSceneType(type: .main) + } +} diff --git a/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift b/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift index 333d7a33..bf788baa 100644 --- a/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift +++ b/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift @@ -3,5 +3,6 @@ import InputInformationFeatureInterface import MainFeatureInterface import SigninFeatureInterface import SplashFeatureInterface +import MyPageFeatureInterface -protocol RootIntentProtocol: InputInformationDelegate, SigninDelegate, MainDelegate, SplashDelegate {} +protocol RootIntentProtocol: InputInformationDelegate, SigninDelegate, MainDelegate, SplashDelegate, MyPageDelegate {} From 54d7a8d6bf5573cdb38dc90150f06166d4b9c896 Mon Sep 17 00:00:00 2001 From: Sunghun Kim <81547954+kimsh153@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:12:05 +0900 Subject: [PATCH 2/3] =?UTF-8?q?:sparkles:=20[#271]=20MyPageFeature=20/=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=92=A4?= =?UTF-8?q?=EB=A1=9C=EA=B0=80=EC=84=9C=20refresh=EB=90=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Feature/MyPageFeature/Sources/Scene/MyPageView.swift | 1 + .../Feature/RootFeature/Sources/Intent/RootIntent.swift | 6 ------ .../RootFeature/Sources/Intent/RootIntentProtocol.swift | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Projects/Feature/MyPageFeature/Sources/Scene/MyPageView.swift b/Projects/Feature/MyPageFeature/Sources/Scene/MyPageView.swift index 666abf9f..0e25903c 100644 --- a/Projects/Feature/MyPageFeature/Sources/Scene/MyPageView.swift +++ b/Projects/Feature/MyPageFeature/Sources/Scene/MyPageView.swift @@ -32,6 +32,7 @@ struct MyPageView: View { CTAButton(text: "저장") { intent.modifyToInputAllInfo(state: state) + dismiss() } .padding(.horizontal, 20) .padding(.bottom, safeAreaInsets.bottom + 16) diff --git a/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift b/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift index 30c756ec..20282ac3 100644 --- a/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift +++ b/Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift @@ -40,9 +40,3 @@ extension RootIntent: SplashDelegate { model?.updateSceneType(type: isLoggedIn ? .main : .signin) } } - -extension RootIntent: MyPageDelegate { - func completeModify() { - model?.updateSceneType(type: .main) - } -} diff --git a/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift b/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift index bf788baa..333d7a33 100644 --- a/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift +++ b/Projects/Feature/RootFeature/Sources/Intent/RootIntentProtocol.swift @@ -3,6 +3,5 @@ import InputInformationFeatureInterface import MainFeatureInterface import SigninFeatureInterface import SplashFeatureInterface -import MyPageFeatureInterface -protocol RootIntentProtocol: InputInformationDelegate, SigninDelegate, MainDelegate, SplashDelegate, MyPageDelegate {} +protocol RootIntentProtocol: InputInformationDelegate, SigninDelegate, MainDelegate, SplashDelegate {} From 176962099b3af7c0f72942e04365addd892e1912 Mon Sep 17 00:00:00 2001 From: Sunghun Kim <81547954+kimsh153@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:20:11 +0900 Subject: [PATCH 3/3] =?UTF-8?q?:test=5Ftube:=20[#271]=20Testing=20/=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Feature/MyPageFeature/Demo/Sources/AppDelegate.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Projects/Feature/MyPageFeature/Demo/Sources/AppDelegate.swift b/Projects/Feature/MyPageFeature/Demo/Sources/AppDelegate.swift index b1d19e75..0dd050b1 100644 --- a/Projects/Feature/MyPageFeature/Demo/Sources/AppDelegate.swift +++ b/Projects/Feature/MyPageFeature/Demo/Sources/AppDelegate.swift @@ -9,6 +9,8 @@ import TechStackAppendFeatureInterface @testable import MajorDomainTesting final class DummyMyPageDelegate: MyPageDelegate { + func completeModify() {} + func logout() {} }