File tree Expand file tree Collapse file tree 7 files changed +59
-92
lines changed
FeatureCategoryDetail/Sources
FeatureCategorySharing/Sources/CategorySharing
FeatureContentList/Sources/ContentList
FeatureRecommend/Sources/Recommend Expand file tree Collapse file tree 7 files changed +59
-92
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ public struct PokitCaution: View {
128128
129129 Spacer ( )
130130 }
131+ . padding ( . bottom, 80 )
132+ . frame ( maxHeight: . infinity)
133+ . padding ( . bottom, 92 )
131134 }
132135}
133136
Original file line number Diff line number Diff line change @@ -33,11 +33,7 @@ public struct PokitList<Item: PokitSelectItem>: View {
3333
3434 public var body : some View {
3535 if list. isEmpty {
36- VStack {
37- PokitCaution ( type: . 카테고리없음)
38-
39- Spacer ( )
40- }
36+ PokitCaution ( type: . 카테고리없음)
4137 } else {
4238 ScrollView {
4339 VStack ( spacing: 0 ) {
Original file line number Diff line number Diff line change @@ -288,14 +288,10 @@ private extension CategoryDetailView {
288288 Group {
289289 if !store. isLoading {
290290 if store. contents. isEmpty {
291- VStack {
292- PokitCaution (
293- type: . 포킷상세_링크없음,
294- action: { send ( . 링크_추가_버튼_눌렀을때) }
295- )
296-
297- Spacer ( )
298- }
291+ PokitCaution (
292+ type: . 포킷상세_링크없음,
293+ action: { send ( . 링크_추가_버튼_눌렀을때) }
294+ )
299295 } else {
300296 LazyVStack ( spacing: 0 ) {
301297 ForEach (
Original file line number Diff line number Diff line change @@ -90,12 +90,7 @@ private extension CategorySharingView {
9090 Group {
9191 if !store. isLoading {
9292 if store. contents. isEmpty {
93- VStack {
94- PokitCaution ( type: . 링크없음)
95- . padding ( . top, 20 )
96-
97- Spacer ( )
98- }
93+ PokitCaution ( type: . 링크없음)
9994 } else {
10095 ScrollView ( showsIndicators: false ) {
10196 LazyVStack ( spacing: 0 ) {
Original file line number Diff line number Diff line change @@ -58,43 +58,39 @@ private extension ContentListView {
5858 }
5959 }
6060
61+ @ViewBuilder
6162 var list : some View {
62- Group {
63- if !store. isLoading {
64- if store. contents. isEmpty {
65- PokitCaution ( type: . 즐겨찾기_링크없음)
66- . padding ( . top, 100 )
67-
68- Spacer ( )
69- } else {
70- ScrollView {
71- LazyVStack ( spacing: 0 ) {
72- ForEach (
73- Array ( store. scope ( state: \. contents, action: \. contents) )
74- ) { store in
75- let isFirst = store. state. id == self . store. contents. first? . id
76- let isLast = store. state. id == self . store. contents. last? . id
77-
78- ContentCardView (
79- store: store,
80- type: . linkList,
81- isFirst: isFirst,
82- isLast: isLast
83- )
84- }
63+ if !store. isLoading {
64+ if store. contents. isEmpty {
65+ PokitCaution ( type: . 즐겨찾기_링크없음)
66+ } else {
67+ ScrollView {
68+ LazyVStack ( spacing: 0 ) {
69+ ForEach (
70+ Array ( store. scope ( state: \. contents, action: \. contents) )
71+ ) { store in
72+ let isFirst = store. state. id == self . store. contents. first? . id
73+ let isLast = store. state. id == self . store. contents. last? . id
8574
86- if store. hasNext {
87- PokitLoading ( )
88- . task { await send ( . pagenation) . finish ( ) }
89- }
75+ ContentCardView (
76+ store: store,
77+ type: . linkList,
78+ isFirst: isFirst,
79+ isLast: isLast
80+ )
81+ }
82+
83+ if store. hasNext {
84+ PokitLoading ( )
85+ . task { await send ( . pagenation) . finish ( ) }
9086 }
91- . padding ( . horizontal, 20 )
92- . padding ( . bottom, 36 )
9387 }
88+ . padding ( . horizontal, 20 )
89+ . padding ( . bottom, 36 )
9490 }
95- } else {
96- PokitLoading ( )
9791 }
92+ } else {
93+ PokitLoading ( )
9894 }
9995 }
10096
Original file line number Diff line number Diff line change @@ -121,34 +121,28 @@ private extension PokitRootView {
121121 Group {
122122 if store. folderType == . folder( . 포킷) {
123123 pokitView
124+ . padding ( . top, 20 )
124125 } else {
125126 unclassifiedView
126127 }
127128 }
128- . padding ( . top, 20 )
129129 . scrollIndicators ( . hidden)
130130 . animation ( . pokitDissolve, value: store. folderType)
131131 }
132132
133+ @ViewBuilder
133134 var pokitView : some View {
134- Group {
135- if let categories = store. categories {
136- if categories. isEmpty {
137- VStack {
138- PokitCaution (
139- type: . 카테고리없음,
140- action: { send ( . 포킷추가_버튼_눌렀을때) }
141- )
142- . padding ( . top, 36 )
143-
144- Spacer ( )
145- }
146- } else {
147- pokitList ( categories)
148- }
135+ if let categories = store. categories {
136+ if categories. isEmpty {
137+ PokitCaution (
138+ type: . 카테고리없음,
139+ action: { send ( . 포킷추가_버튼_눌렀을때) }
140+ )
149141 } else {
150- PokitLoading ( )
142+ pokitList ( categories )
151143 }
144+ } else {
145+ PokitLoading ( )
152146 }
153147 }
154148
@@ -183,25 +177,20 @@ private extension PokitRootView {
183177 }
184178 }
185179
180+ @ViewBuilder
186181 var unclassifiedView : some View {
187- Group {
188- if !store. isLoading {
189- if store. contents. isEmpty {
190- VStack {
191- PokitCaution (
192- type: . 미분류_링크없음,
193- action: { send ( . 링크추가_버튼_눌렀을때) }
194- )
195- . padding ( . top, 36 )
196-
197- Spacer ( )
198- }
199- } else {
200- unclassifiedList
201- }
182+ if !store. isLoading {
183+ if store. contents. isEmpty {
184+ PokitCaution (
185+ type: . 미분류_링크없음,
186+ action: { send ( . 링크추가_버튼_눌렀을때) }
187+ )
202188 } else {
203- PokitLoading ( )
189+ unclassifiedList
190+ . padding ( . top, 20 )
204191 }
192+ } else {
193+ PokitLoading ( )
205194 }
206195 }
207196
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ private extension RecommendView {
164164 var list : some View {
165165 if let recommendedList = store. recommendedList {
166166 if recommendedList. isEmpty {
167- empty
167+ PokitCaution ( type : . 추천_링크없음 )
168168 } else {
169169 listContent ( recommendedList)
170170 }
@@ -173,14 +173,6 @@ private extension RecommendView {
173173 }
174174 }
175175
176- @ViewBuilder
177- var empty : some View {
178- PokitCaution ( type: . 추천_링크없음)
179- . padding ( . top, 100 )
180-
181- Spacer ( )
182- }
183-
184176 @ViewBuilder
185177 func listContent(
186178 _ recommendedList: IdentifiedArrayOf < BaseContentItem >
You can’t perform that action at this time.
0 commit comments