File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed
FeatureCategoryDetail/Sources
FeatureContentSetting/Sources/ContentSetting Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,11 @@ public extension MainTabFeature {
171171 state. path. append ( . 링크추가및수정( ContentSettingFeature . State ( urlText: state. link) ) )
172172 state. link = nil
173173 return . none
174+
175+ case let . path( . element( _, action: . 카테고리상세( . delegate( . 링크추가( categoryId) ) ) ) ) :
176+ state. categoryId = categoryId
177+ state. path. append ( . 링크추가및수정( ContentSettingFeature . State ( ) ) )
178+ return . none
174179
175180 /// - 링크추가 및 수정에서 저장하기 눌렀을 때
176181 case let . path( . element( stackElementId, action: . 링크추가및수정( . delegate( . 저장하기_완료( contentId) ) ) ) ) :
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ public struct CategoryDetailFeature {
9090 case 카테고리_선택했을때( BaseCategoryItem )
9191 case 필터_버튼_눌렀을때
9292 case 뷰가_나타났을때
93+ case 링크_추가_버튼_눌렀을때
9394 }
9495
9596 public enum InnerAction : Equatable {
@@ -121,6 +122,7 @@ public struct CategoryDetailFeature {
121122 case contentItemTapped( BaseContentItem )
122123 case linkCopyDetected( URL ? )
123124 case 링크수정( contentId: Int )
125+ case 링크추가( categoryId: Int )
124126 case 포킷삭제
125127 case 포킷수정( BaseCategoryItem )
126128 case 포킷공유
@@ -186,6 +188,10 @@ private extension CategoryDetailFeature {
186188 )
187189 return . none
188190
191+ case . 링크_추가_버튼_눌렀을때:
192+ let id = state. category. id
193+ return . send( . delegate( . 링크추가( categoryId: id) ) )
194+
189195 case . 카테고리_케밥_버튼_눌렀을때:
190196 return . run { send in await send ( . inner( . 카테고리_시트_활성화( true ) ) ) }
191197
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public extension CategoryDetailView {
3737 . padding ( . horizontal, 20 )
3838 . padding ( . top, 12 )
3939 . pokitNavigationBar { navigationBar }
40- . pokitFloatButton ( action: { } )
40+ . pokitFloatButton ( action: { send ( . 링크_추가_버튼_눌렀을때 ) } )
4141 . ignoresSafeArea ( edges: . bottom)
4242 . sheet ( isPresented: $store. isCategorySheetPresented) {
4343 PokitBottomSheet (
@@ -147,7 +147,7 @@ private extension CategoryDetailView {
147147 . resizable ( )
148148 . frame ( width: 16 , height: 16 )
149149 . foregroundStyle ( iconColor)
150- Text ( " \( store. category . contentCount ) 개 " )
150+ Text ( " \( store. contents . count ) 개 " )
151151 . foregroundStyle ( textColor)
152152 . pokitFont ( . b2( . m) )
153153 }
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ private extension ContentSettingFeature {
212212
213213 return . send( . delegate( . 포킷추가하기) )
214214 case . 뒤로가기_버튼_눌렀을때:
215+ state. categoryId = nil
215216 return state. isShareExtension
216217 ? . send( . delegate( . dismiss) )
217218 : . run { _ in await dismiss ( ) }
You can’t perform that action at this time.
0 commit comments