Skip to content

Commit

Permalink
[fix] 포킷 카테고리 삭제 시 delegate 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeKim98 committed Nov 6, 2024
1 parent cc7b3af commit 788e66d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
4 changes: 2 additions & 2 deletions Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public struct PokitRootFeature {
case contentDetailTapped(BaseContentItem)
case 미분류_카테고리_컨텐츠_조회

case 카테고리_삭제
case 카테고리_삭제(Int)
}
}

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 788e66d

Please sign in to comment.