fix: address config settings viewbuilder updates
This commit is contained in:
@@ -27,8 +27,8 @@ struct ConfigSettings: View {
|
|||||||
await self.store.loadConfig()
|
await self.store.loadConfig()
|
||||||
}
|
}
|
||||||
.onAppear { self.ensureSelection() }
|
.onAppear { self.ensureSelection() }
|
||||||
.onChange(of: self.store.configSchema) { _, _ in
|
.onChange(of: self.store.configSchemaLoading) { _, loading in
|
||||||
self.ensureSelection()
|
if !loading { self.ensureSelection() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,7 +215,9 @@ extension ConfigSettings {
|
|||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private func subsectionNav(_ section: ConfigSection) -> some View {
|
private func subsectionNav(_ section: ConfigSection) -> some View {
|
||||||
let subsections = self.resolveSubsections(for: section)
|
let subsections = self.resolveSubsections(for: section)
|
||||||
guard !subsections.isEmpty else { return }
|
if subsections.isEmpty {
|
||||||
|
EmptyView()
|
||||||
|
} else {
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
self.subsectionButton(
|
self.subsectionButton(
|
||||||
@@ -236,6 +238,7 @@ extension ConfigSettings {
|
|||||||
.padding(.vertical, 2)
|
.padding(.vertical, 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func subsectionButton(
|
private func subsectionButton(
|
||||||
title: String,
|
title: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user