From a2dec30e4740a7ffcb7aeb02f1f699b72f5dde3a Mon Sep 17 00:00:00 2001 From: Younghoon Ahn Date: Fri, 17 Nov 2023 09:18:54 +0900 Subject: [PATCH] =?UTF-8?q?rename:=20=EB=AA=A8=EB=93=A0=20=EB=89=B4?= =?UTF-8?q?=EC=8A=A4=20=EC=BC=80=EC=9D=B4=EC=8A=A4=20allNews=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Targets/D3N/Sources/App/RootStore.swift | 8 ++++---- .../Feature/AllNews/AllNewsNavigationStackStore.swift | 8 ++++---- .../Feature/AllNews/AllNewsNavigationStackView.swift | 6 +++--- .../Feature/Today/TodayNavigationStackStore.swift | 10 +++++----- .../Feature/Today/TodayNavigationStackView.swift | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Targets/D3N/Sources/App/RootStore.swift b/Targets/D3N/Sources/App/RootStore.swift index 234f5df..aa479b7 100644 --- a/Targets/D3N/Sources/App/RootStore.swift +++ b/Targets/D3N/Sources/App/RootStore.swift @@ -16,11 +16,11 @@ struct RootStore: Reducer { case mainTab(MainTabStore.State) init() { -// if LocalStorageManager.load(.isOnBoardingNeeded) != false { -// self = .onboarding(.init()) -// } else { + if LocalStorageManager.load(.isOnBoardingNeeded) != false { + self = .onboarding(.init()) + } else { self = .mainTab(.init()) -// } + } } } diff --git a/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackStore.swift b/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackStore.swift index 8acc5c6..0a44404 100644 --- a/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackStore.swift +++ b/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackStore.swift @@ -35,13 +35,13 @@ public struct AllNewsNavigationStackStore: Reducer { public enum State: Equatable { case quizMain(QuizMainStore.State) case quizResult(QuizResultStore.State) - case newsList(AllNewsStore.State) + case allNews(AllNewsStore.State) } public enum Action: Equatable { case quizMain(QuizMainStore.Action) case quizResult(QuizResultStore.Action) - case newsList(AllNewsStore.Action) + case allNews(AllNewsStore.Action) } public var body: some Reducer { @@ -51,7 +51,7 @@ public struct AllNewsNavigationStackStore: Reducer { Scope(state: /State.quizResult, action: /Action.quizResult) { QuizResultStore() } - Scope(state: /State.newsList, action: /Action.newsList) { + Scope(state: /State.allNews, action: /Action.allNews) { AllNewsStore() } } @@ -85,7 +85,7 @@ public struct AllNewsNavigationStackStore: Reducer { return .send(.popToRoot) } - case let .path(.element(id: _, action: .newsList(.delegate(action)))): + case let .path(.element(id: _, action: .allNews(.delegate(action)))): switch action { case let .select(newsEntity): state.path.append(.quizMain(.init(newsEntity: newsEntity))) diff --git a/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackView.swift b/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackView.swift index 5e3fc38..8df6209 100644 --- a/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackView.swift +++ b/Targets/D3N/Sources/Feature/AllNews/AllNewsNavigationStackView.swift @@ -44,10 +44,10 @@ public struct AllNewsNavigationStackView: View { then: QuizResultView.init(store:) ) - case .newsList: + case .allNews: CaseLet( - /AllNewsNavigationStackStore.Path.State.newsList, - action: TodayNavigationStackStore.Path.Action.newsList, + /AllNewsNavigationStackStore.Path.State.allNews, + action: TodayNavigationStackStore.Path.Action.allNews, then: AllNewsView.init(store:) ) } diff --git a/Targets/D3N/Sources/Feature/Today/TodayNavigationStackStore.swift b/Targets/D3N/Sources/Feature/Today/TodayNavigationStackStore.swift index 37b3f57..20c4831 100644 --- a/Targets/D3N/Sources/Feature/Today/TodayNavigationStackStore.swift +++ b/Targets/D3N/Sources/Feature/Today/TodayNavigationStackStore.swift @@ -36,14 +36,14 @@ public struct TodayNavigationStackStore: Reducer { case detail(TodayDetailStore.State) case quizMain(QuizMainStore.State) case quizResult(QuizResultStore.State) - case newsList(AllNewsStore.State) + case allNews(AllNewsStore.State) } public enum Action: Equatable { case detail(TodayDetailStore.Action) case quizMain(QuizMainStore.Action) case quizResult(QuizResultStore.Action) - case newsList(AllNewsStore.Action) + case allNews(AllNewsStore.Action) } public var body: some Reducer { @@ -56,7 +56,7 @@ public struct TodayNavigationStackStore: Reducer { Scope(state: /State.quizResult, action: /Action.quizResult) { QuizResultStore() } - Scope(state: /State.newsList, action: /Action.newsList) { + Scope(state: /State.allNews, action: /Action.allNews) { AllNewsStore() } } @@ -76,7 +76,7 @@ public struct TodayNavigationStackStore: Reducer { state.path.append(.quizMain(.init(newsEntity: newsEntity))) return .none case .allNewsButtonTapped: - state.path.append(.newsList(.init())) + state.path.append(.allNews(.init())) return .none } @@ -93,7 +93,7 @@ public struct TodayNavigationStackStore: Reducer { return .send(.popToRoot) } - case let .path(.element(id: _, action: .newsList(.delegate(action)))): + case let .path(.element(id: _, action: .allNews(.delegate(action)))): switch action { case let .select(newsEntity): state.path.append(.quizMain(.init(newsEntity: newsEntity))) diff --git a/Targets/D3N/Sources/Feature/Today/TodayNavigationStackView.swift b/Targets/D3N/Sources/Feature/Today/TodayNavigationStackView.swift index f7ff393..f29924c 100644 --- a/Targets/D3N/Sources/Feature/Today/TodayNavigationStackView.swift +++ b/Targets/D3N/Sources/Feature/Today/TodayNavigationStackView.swift @@ -51,10 +51,10 @@ public struct TodayNavigationStackView: View { then: QuizResultView.init(store:) ) - case .newsList: + case .allNews: CaseLet( - /TodayNavigationStackStore.Path.State.newsList, - action: TodayNavigationStackStore.Path.Action.newsList, + /TodayNavigationStackStore.Path.State.allNews, + action: TodayNavigationStackStore.Path.Action.allNews, then: AllNewsView.init(store:) ) }