Skip to content

Commit e7cfe50

Browse files
committed
[fix] #187 관심사 별 추천조회 애니메이션 수정
1 parent 36e187b commit e7cfe50

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ private extension RecommendFeature {
178178
y: UnitPoint.leading.y
179179
)
180180
proxy.scrollTo("전체보기", anchor: anchor)
181+
state.domain.contentList.data = nil
181182
return shared(.async(.추천_조회_API), state: &state)
182183
case let .관심사_버튼_눌렀을때(interest, proxy):
183184
guard state.selectedInterest != interest else { return .none }
@@ -189,6 +190,7 @@ private extension RecommendFeature {
189190
y: UnitPoint.leading.y
190191
)
191192
proxy.scrollTo(interest.description, anchor: anchor)
193+
state.domain.contentList.data = nil
192194
return shared(.async(.추천_조회_API), state: &state)
193195
case .링크_공유_완료되었을때:
194196
state.shareContent = nil

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,10 @@ private extension RecommendView {
117117
? .filled(.primary)
118118
: .default(.secondary),
119119
size: .small,
120-
shape: .round
121-
) {
122-
send(
123-
.전체보기_버튼_눌렀을때(proxy),
124-
animation: .pokitDissolve
125-
)
126-
}
120+
shape: .round,
121+
action: { send(.전체보기_버튼_눌렀을때(proxy)) }
122+
)
123+
.animation(.pokitDissolve, value: isAllSelected)
127124
.id("전체보기")
128125

129126
ForEach(store.myInterestList) { interest in
@@ -135,13 +132,10 @@ private extension RecommendView {
135132
? .filled(.primary)
136133
: .default(.secondary),
137134
size: .small,
138-
shape: .round
139-
) {
140-
send(
141-
.관심사_버튼_눌렀을때(interest, proxy),
142-
animation: .pokitDissolve
143-
)
144-
}
135+
shape: .round,
136+
action: { send(.관심사_버튼_눌렀을때(interest, proxy)) }
137+
)
138+
.animation(.pokitDissolve, value: isSelected)
145139
.id(interest.description)
146140
}
147141
}

0 commit comments

Comments
 (0)