Comment out SceneStorage since it crashes on launch on macOS

This commit is contained in:
Maurice Parker 2020-06-30 20:38:55 -05:00
parent 53a26f89fe
commit 6ddf0f29fb

View File

@ -11,7 +11,8 @@ import Account
struct SidebarView: View { struct SidebarView: View {
@SceneStorage("expandedContainers") private var expandedContainerData = Data() // I had to comment out SceneStorage because it blows up if used on macOS
// @SceneStorage("expandedContainers") private var expandedContainerData = Data()
@StateObject private var expandedContainers = SidebarExpandedContainers() @StateObject private var expandedContainers = SidebarExpandedContainers()
@EnvironmentObject private var sidebarModel: SidebarModel @EnvironmentObject private var sidebarModel: SidebarModel
@ -41,11 +42,11 @@ struct SidebarView: View {
} }
} }
} }
.onAppear { // .onAppear {
expandedContainers.data = expandedContainerData // expandedContainers.data = expandedContainerData
} // }
.onReceive(expandedContainers.objectDidChange) { // .onReceive(expandedContainers.objectDidChange) {
expandedContainerData = expandedContainers.data // expandedContainerData = expandedContainers.data
} // }
} }
} }