mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 18:24:02 +00:00
Extract progress view, show video details loading
This commit is contained in:
@@ -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 {
|
||||
|
@@ -99,7 +99,7 @@ struct PlaybackBar: View {
|
||||
return "LIVE"
|
||||
}
|
||||
|
||||
guard player.time != nil, player.time!.isValid, !player.currentVideo.isNil else {
|
||||
guard !player.isLoadingVideo else {
|
||||
return "loading..."
|
||||
}
|
||||
|
||||
|
@@ -97,8 +97,12 @@ struct VideoDetails: View {
|
||||
|
||||
switch currentPage {
|
||||
case .info:
|
||||
ScrollView(.vertical) {
|
||||
detailsPage
|
||||
if player.isLoadingVideo {
|
||||
PlaceholderProgressView()
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
detailsPage
|
||||
}
|
||||
}
|
||||
case .queue:
|
||||
PlayerQueueView(sidebarQueue: $sidebarQueue, fullScreen: $fullScreen)
|
||||
|
Reference in New Issue
Block a user