Merge branch 'main' into feature_tvOS
This commit is contained in:
@@ -16,22 +16,22 @@ struct DetailView: View {
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if viewModel.isLoading {
|
||||
ProgressView()
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else if let error = viewModel.error {
|
||||
errorView(error)
|
||||
} else if let detail = viewModel.detail {
|
||||
if let detail = viewModel.detail {
|
||||
ScrollView {
|
||||
detailContent(detail)
|
||||
}
|
||||
} else if let error = viewModel.error {
|
||||
errorView(error)
|
||||
} else {
|
||||
ProgressView()
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
.navigationTitle(item.title)
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.task {
|
||||
.task(id: item.id) {
|
||||
if viewModel.detail == nil {
|
||||
await viewModel.loadDetail(path: item.detailURL)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user