feat(refresh): Lottie 새로고침 표시를 적용한다
This commit is contained in:
@@ -21,7 +21,9 @@ struct MainHomeRecommendationView: View {
|
||||
if viewModel.isLoading && viewModel.recommendations == nil && viewModel.errorMessage.isEmpty {
|
||||
loadingContent
|
||||
} else {
|
||||
ScrollView(showsIndicators: false) {
|
||||
LottieRefreshableScrollView(action: {
|
||||
await viewModel.refresh()
|
||||
}) {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s24) {
|
||||
MainHomeLiveSection(
|
||||
items: viewModel.recommendations?.lives ?? [],
|
||||
@@ -82,9 +84,6 @@ struct MainHomeRecommendationView: View {
|
||||
}
|
||||
.padding(.vertical, SodaSpacing.s20)
|
||||
}
|
||||
.refreshable {
|
||||
await viewModel.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
@@ -119,15 +118,14 @@ struct MainHomeRecommendationView: View {
|
||||
|
||||
private var loadingContent: some View {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(showsIndicators: false) {
|
||||
LottieRefreshableScrollView(action: {
|
||||
await viewModel.refresh()
|
||||
}) {
|
||||
ProgressView()
|
||||
.progressViewStyle(CircularProgressViewStyle(tint: .white))
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
.refreshable {
|
||||
await viewModel.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user