From 6dbab9fd131803a6a39b1514989e2e32b16f8bdf Mon Sep 17 00:00:00 2001 From: baegteun Date: Wed, 4 Oct 2023 12:21:15 +0900 Subject: [PATCH] =?UTF-8?q?:zap:=20::=20[#201]=20SelfStudyFeature=20/=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EA=B0=80=EC=A0=B8=EC=98=A4?= =?UTF-8?q?=EB=8A=94=20=EC=8B=9C=EC=A0=90=20viewDidLoad=20->=20viewWillApp?= =?UTF-8?q?ear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassageFeature/Sources/Scene/MassageStore.swift | 8 ++++---- .../Sources/Scene/MassageViewController.swift | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Projects/Feature/MassageFeature/Sources/Scene/MassageStore.swift b/Projects/Feature/MassageFeature/Sources/Scene/MassageStore.swift index f9c9a56a..0f104f5b 100644 --- a/Projects/Feature/MassageFeature/Sources/Scene/MassageStore.swift +++ b/Projects/Feature/MassageFeature/Sources/Scene/MassageStore.swift @@ -27,7 +27,7 @@ final class MassageStore: BaseStore { } enum Action { - case viewDidLoad + case viewWillAppear case fetchMassageRankList } @@ -40,8 +40,8 @@ final class MassageStore: BaseStore { extension MassageStore { func mutate(state: State, action: Action) -> SideEffect { switch action { - case .viewDidLoad: - return viewDidLoad() + case .viewWillAppear: + return viewWillAppear() case .fetchMassageRankList: return fetchMassageRankList() @@ -66,7 +66,7 @@ extension MassageStore { // MARK: - Mutate private extension MassageStore { - func viewDidLoad() -> SideEffect { + func viewWillAppear() -> SideEffect { return self.fetchMassageRankList() } diff --git a/Projects/Feature/MassageFeature/Sources/Scene/MassageViewController.swift b/Projects/Feature/MassageFeature/Sources/Scene/MassageViewController.swift index 8277090b..696f4d39 100644 --- a/Projects/Feature/MassageFeature/Sources/Scene/MassageViewController.swift +++ b/Projects/Feature/MassageFeature/Sources/Scene/MassageViewController.swift @@ -63,8 +63,8 @@ final class MassageViewController: BaseStoredViewController { } override func bindAction() { - viewDidLoadPublisher - .map { Store.Action.viewDidLoad } + viewWillAppearPublisher + .map { Store.Action.viewWillAppear } .sink(receiveValue: store.send(_:)) .store(in: &subscription)