mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
More uniform comments UI
This commit is contained in:
@@ -117,9 +117,18 @@ struct NowPlayingView: View {
|
||||
}
|
||||
|
||||
if sections.contains(.comments) {
|
||||
Section {
|
||||
ForEach(comments.all) { comment in
|
||||
CommentView(comment: comment, repliesID: $repliesID)
|
||||
if !comments.loaded {
|
||||
VStack(alignment: .center) {
|
||||
progressView
|
||||
.onAppear {
|
||||
comments.load()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Section {
|
||||
ForEach(comments.all) { comment in
|
||||
CommentView(comment: comment, repliesID: $repliesID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,6 +146,19 @@ struct NowPlayingView: View {
|
||||
.font((inInfoViewController ? Font.system(size: 40) : .title3).bold())
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
private var progressView: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
ProgressView()
|
||||
Spacer()
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct NowPlayingView_Previews: PreviewProvider {
|
||||
|
Reference in New Issue
Block a user