Extract progress view, show video details loading

This commit is contained in:
Arkadiusz Fal
2021-12-29 19:39:38 +01:00
parent e4f3914ff8
commit ab174c73fd
7 changed files with 46 additions and 31 deletions

View File

@@ -14,7 +14,7 @@ struct CommentsView: View {
Text("No comments")
.foregroundColor(.secondary)
} else if !comments.loaded {
progressView
PlaceholderProgressView()
.onAppear {
comments.load()
}
@@ -60,19 +60,6 @@ struct CommentsView: View {
}
.padding(.horizontal)
}
private var progressView: some View {
VStack {
Spacer()
HStack {
Spacer()
ProgressView()
Spacer()
}
Spacer()
}
}
}
struct CommentsView_Previews: PreviewProvider {