More uniform comments UI

This commit is contained in:
Arkadiusz Fal
2021-12-17 20:46:49 +01:00
parent 008cd1553d
commit 923f0c0356
4 changed files with 117 additions and 67 deletions

View File

@@ -16,6 +16,9 @@ struct CommentsView: View {
.foregroundColor(.secondary)
} else if !comments.loaded {
progressView
.onAppear {
comments.load()
}
} else {
ScrollView(.vertical, showsIndicators: false) {
VStack(alignment: .leading) {
@@ -48,6 +51,7 @@ struct CommentsView: View {
}
}
}
.font(.system(size: 13))
.buttonStyle(.plain)
.padding(.vertical, 8)
.foregroundColor(.secondary)
@@ -56,11 +60,6 @@ struct CommentsView: View {
}
}
.padding(.horizontal)
.onAppear {
if !comments.loaded {
comments.load()
}
}
}
private var progressView: some View {