2020-06-29 20:14:03 +02:00
|
|
|
//
|
2020-06-30 18:03:33 +02:00
|
|
|
// RegularSidebarContainerView.swift
|
2020-06-29 20:14:03 +02:00
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/28/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct RegularSidebarContainerView: View {
|
|
|
|
|
|
|
|
@EnvironmentObject private var sceneModel: SceneModel
|
|
|
|
@StateObject private var sidebarModel = SidebarModel()
|
|
|
|
|
2020-06-30 15:22:23 +02:00
|
|
|
@State private var showSettings: Bool = false
|
|
|
|
|
|
|
|
@ViewBuilder var body: some View {
|
2020-06-29 20:14:03 +02:00
|
|
|
SidebarView()
|
|
|
|
.environmentObject(sidebarModel)
|
|
|
|
.navigationTitle(Text("Feeds"))
|
|
|
|
.listStyle(SidebarListStyle())
|
|
|
|
.onAppear {
|
|
|
|
sceneModel.sidebarModel = sidebarModel
|
|
|
|
sidebarModel.delegate = sceneModel
|
|
|
|
sidebarModel.rebuildSidebarItems()
|
|
|
|
}
|
2020-06-30 15:22:23 +02:00
|
|
|
.overlay(Group {
|
|
|
|
#if os(iOS)
|
|
|
|
SidebarToolbar()
|
|
|
|
#endif
|
|
|
|
},alignment: .bottom)
|
|
|
|
|
2020-06-29 20:14:03 +02:00
|
|
|
}
|
2020-06-30 15:22:23 +02:00
|
|
|
|
2020-06-29 20:14:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
struct RegularSidebarContainerView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
RegularSidebarContainerView()
|
|
|
|
.environmentObject(SceneModel())
|
|
|
|
}
|
|
|
|
}
|