From 3994aeefaa64fd0924ac3519a4121825a5b38470 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: Tue, 15 Oct 2024 17:01:36 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20#129=20=ED=94=BC=EB=93=9C=EB=B0=B1?= =?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 --- .../Sources/ContentDetail/ContentDetailFeature.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Projects/Feature/FeatureContentDetail/Sources/ContentDetail/ContentDetailFeature.swift b/Projects/Feature/FeatureContentDetail/Sources/ContentDetail/ContentDetailFeature.swift index 7c5c80a8..2d2bb436 100644 --- a/Projects/Feature/FeatureContentDetail/Sources/ContentDetail/ContentDetailFeature.swift +++ b/Projects/Feature/FeatureContentDetail/Sources/ContentDetail/ContentDetailFeature.swift @@ -163,11 +163,9 @@ private extension ContentDetailFeature { let favorites = state.domain.content?.favorites else { return .none } - if favorites { - return .send(.async(.즐겨찾기_취소_API(id: content.id))) - } else { - return .send(.async(.즐겨찾기_API(id: content.id))) - } + return favorites + ? .send(.async(.즐겨찾기_취소_API(id: content.id))) + : .send(.async(.즐겨찾기_API(id: content.id))) case .링크_공유_완료되었을때: state.showShareSheet = false return .none @@ -208,7 +206,7 @@ private extension ContentDetailFeature { case .컨텐츠_상세_조회_API_반영(content: let content): state.domain.content = content return .merge( - .send(.delegate(.컨텐츠_삭제_완료)), + .send(.delegate(.컨텐츠_조회_완료)), .send(.inner(.URL_유효성_확인)) ) case .즐겨찾기_API_반영(let favorite):