Change to sidebar list style

This commit is contained in:
Maurice Parker 2020-06-29 06:31:50 -05:00
parent 86b929743b
commit be39448e01

View File

@ -16,16 +16,13 @@ struct SidebarView: View {
var body: some View { var body: some View {
List { List {
ForEach(sidebarModel.sidebarItems) { section in ForEach(sidebarModel.sidebarItems) { section in
Section(header: Text(section.nameForDisplay)) { OutlineGroup(sidebarModel.sidebarItems, children: \.children) { sidebarItem in
ForEach(section.children ?? [SidebarItem]()) { topItem in Text(sidebarItem.nameForDisplay)
OutlineGroup(topItem, children: \.children) { sidebarItem in
Text(sidebarItem.nameForDisplay)
}
}
} }
} }
} }
.navigationTitle(Text("Feeds")) .navigationTitle(Text("Feeds"))
.listStyle(SidebarListStyle())
.onAppear { .onAppear {
sceneModel.sidebarModel = sidebarModel sceneModel.sidebarModel = sidebarModel
sidebarModel.delegate = sceneModel sidebarModel.delegate = sceneModel