Change to sidebar list style

This commit is contained in:
Maurice Parker 2020-06-29 06:31:50 -05:00
parent 86b929743b
commit be39448e01
1 changed files with 3 additions and 6 deletions

View File

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