Skip to content

Commit

Permalink
[fix] #120 미분류 컨텐츠 목록에서 컨텐츠 삭제 안되는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeKim98 committed Sep 16, 2024
1 parent 9dee26b commit bc54fdf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public struct PokitRootFeature {
case 카테고리_조회
case 미분류_카테고리_컨텐츠_페이징_재조회
case 카테고리_페이징_재조회
case 미분류_카테고리_컨텐츠_삭제(contentId: Int)
}

public enum ScopeAction: Equatable {
Expand Down Expand Up @@ -456,6 +457,12 @@ private extension PokitRootFeature {
animation: .pokitSpring
)
}
case let .미분류_카테고리_컨텐츠_삭제(contentId):
return .run { send in
let _ = try await contentClient.컨텐츠_삭제("\(contentId)")
await send(.inner(.컨텐츠_삭제(contentId: contentId)), animation: .pokitSpring)
}

}
}

Expand Down Expand Up @@ -531,7 +538,10 @@ private extension PokitRootFeature {
return .none
}

return .send(.inner(.컨텐츠_삭제(contentId: selectedItem.id)), animation: .pokitSpring)
return .send(
.async(.미분류_카테고리_컨텐츠_삭제(contentId: selectedItem.id)),
animation: .pokitSpring
)

case .folder(.포킷):
guard let selectedItem = state.selectedKebobItem else {
Expand Down

0 comments on commit bc54fdf

Please sign in to comment.