From 788e66d39e4c79c63349e83d41f5fb3645829635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=84=ED=98=95?= <108233361+ShapeKim98@users.noreply.github.com> Date: Sun, 27 Oct 2024 17:35:22 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=ED=8F=AC=ED=82=B7=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=EC=82=AD=EC=A0=9C=20=EC=8B=9C=20delegate?= =?UTF-8?q?=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift | 7 +++++-- .../Feature/FeaturePokit/Sources/PokitRootFeature.swift | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift b/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift index 4843e2d8..34f3a995 100644 --- a/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift +++ b/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift @@ -252,8 +252,11 @@ private extension PokitSplitFeature { } state.path.removeAll() return .send(.inner(.카테고리_상세_활성화(category))) - case .포킷(.delegate(.카테고리_삭제)): - state.카테고리상세 = nil + case let .포킷(.delegate(.카테고리_삭제(categoryId))): + if categoryId == state.categoryId { + state.카테고리상세 = nil + state.categoryId = nil + } return .none case let .포킷(.delegate(.수정하기(category))): return .send(.inner(.포킷추가및수정_활성화(category))) diff --git a/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift b/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift index 572cd53b..9760f3a8 100644 --- a/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift +++ b/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift @@ -130,7 +130,7 @@ public struct PokitRootFeature { case contentDetailTapped(BaseContentItem) case 미분류_카테고리_컨텐츠_조회 - case 카테고리_삭제 + case 카테고리_삭제(Int) } } @@ -340,7 +340,7 @@ private extension PokitRootFeature { case let .카테고리_삭제_API(categoryId): return .run { send in try await categoryClient.카테고리_삭제(categoryId) - await send(.delegate(.카테고리_삭제)) + await send(.delegate(.카테고리_삭제(categoryId))) } case .미분류_카테고리_페이징_조회_API: