mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fixes compile crash with sidebar toolbar
This commit is contained in:
@@ -26,7 +26,6 @@ struct RegularSidebarContainerView: View {
|
||||
sidebarModel.delegate = sceneModel
|
||||
sidebarModel.rebuildSidebarItems()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ struct SidebarToolbar: ViewModifier {
|
||||
@EnvironmentObject private var appSettings: AppDefaults
|
||||
@StateObject private var viewModel = SidebarToolbarModel()
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
@ViewBuilder func body(content: Content) -> some View {
|
||||
#if os(iOS)
|
||||
content
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .automatic) {
|
||||
@@ -66,6 +67,14 @@ struct SidebarToolbar: ViewModifier {
|
||||
SettingsView().modifier(PreferredColorSchemeModifier(preferredColorScheme: appSettings.userInterfaceColorPalette))
|
||||
}
|
||||
}
|
||||
#else
|
||||
content
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user