Skip to content

Commit a720fca

Browse files
committed
[feat] #211 카테고리 내 컨텐츠 목록 새로고침 추가
1 parent dd70818 commit a720fca

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Projects/Feature/FeatureCategoryDetail/Sources/CategoryDetailFeature.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public struct CategoryDetailFeature {
110110
case binding(BindingAction<State>)
111111
case dismiss
112112
case pagenation
113+
case 새로고침
113114

114115
/// 즐겨찾기 or 안읽음 버튼 눌렀을 때
115116
case 분류_버튼_눌렀을때(SortCollectType)
@@ -322,6 +323,12 @@ private extension CategoryDetailFeature {
322323

323324
case .저장하기_버튼_눌렀을때:
324325
return .send(.async(.공유받은_포킷_저장_API))
326+
327+
case .새로고침:
328+
return .concatenate(
329+
.send(.inner(.pagenation_초기화), animation: .pokitDissolve),
330+
.send(.async(.카테고리_내_컨텐츠_목록_조회_API))
331+
)
325332
}
326333
}
327334

Projects/Feature/FeatureCategoryDetail/Sources/CategoryDetailView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public extension CategoryDetailView {
5050
}
5151
.listStyle(.plain)
5252
.listRowSpacing(0)
53+
.refreshable { await send(.새로고침).finish() }
5354
.background { scrollObservableView }
5455
.onPreferenceChange(ScrollOffsetKey.self) {
5556
if $0 != targetOffset {

0 commit comments

Comments
 (0)