Skip to content

Commit 69f0d3e

Browse files
committed
[fix] #199 링크 추가(+) 버튼 클릭 -> 포킷 목록 -> 포킷 추가 시 링크 추가 플로우 연결
서버 테스트 필요
1 parent b08f9af commit 69f0d3e

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Projects/App/Sources/MainTab/MainTabPath.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,13 @@ public extension MainTabFeature {
101101
/// - 포킷 `추가` or `수정`이 성공적으로 `완료`되었을 때
102102
case .path(.element(_, action: .포킷추가및수정(.delegate(.settingSuccess)))):
103103
state.path.removeLast()
104-
guard let lastPath = state.path.last else { return .none }
104+
guard let lastPath = state.path.last else {
105+
switch state.selectedTab {
106+
case .pokit: return .none
107+
case .recommend:
108+
return .send(.recommend(.delegate(.포킷_추가하기_완료)))
109+
}
110+
}
105111
switch lastPath {
106112
case .링크공유:
107113
state.path.removeLast()

Projects/Feature/FeatureRecommend/Sources/Recommend/RecommendFeature.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public struct RecommendFeature {
120120
case 알림_버튼_눌렀을때
121121
case 컨텐츠_신고_API_반영
122122
case 포킷_추가하기_버튼_눌렀을때
123+
case 포킷_추가하기_완료
123124
}
124125
}
125126

@@ -371,7 +372,16 @@ private extension RecommendFeature {
371372

372373
/// - Delegate Effect
373374
func handleDelegateAction(_ action: Action.DelegateAction, state: inout State) -> Effect<Action> {
374-
return .none
375+
switch action {
376+
case .포킷_추가하기_완료:
377+
guard state.addContent != nil else { return .none }
378+
state.showSelectSheet = true
379+
return shared(.async(.카테고리_목록_조회_API), state: &state)
380+
case .저장하기_완료:
381+
state.addContent = nil
382+
return .none
383+
default: return .none
384+
}
375385
}
376386

377387
/// - Shared Effect

0 commit comments

Comments
 (0)