Remove macOS navigate code that was messing up performance

This commit is contained in:
Maurice Parker 2020-07-19 20:34:20 -05:00
parent 797b8cd428
commit 6853535b96
1 changed files with 13 additions and 22 deletions

View File

@ -17,7 +17,6 @@ struct SidebarView: View {
@EnvironmentObject private var refreshProgress: RefreshProgressModel @EnvironmentObject private var refreshProgress: RefreshProgressModel
@EnvironmentObject private var sceneModel: SceneModel @EnvironmentObject private var sceneModel: SceneModel
@EnvironmentObject private var sidebarModel: SidebarModel @EnvironmentObject private var sidebarModel: SidebarModel
@State var navigate = false
private let threshold: CGFloat = 80 private let threshold: CGFloat = 80
@State private var previousScrollOffset: CGFloat = 0 @State private var previousScrollOffset: CGFloat = 0
@ -45,10 +44,6 @@ struct SidebarView: View {
.buttonStyle(PlainButtonStyle()) .buttonStyle(PlainButtonStyle())
.help(sidebarModel.isReadFiltered ? "Show Read Feeds" : "Filter Read Feeds") .help(sidebarModel.isReadFiltered ? "Show Read Feeds" : "Filter Read Feeds")
} }
ZStack(alignment: .bottom) {
NavigationLink(destination: TimelineContainerView(), isActive: $navigate) {
EmptyView()
}.hidden()
List(selection: $sidebarModel.selectedFeedIdentifiers) { List(selection: $sidebarModel.selectedFeedIdentifiers) {
rows rows
} }
@ -65,10 +60,6 @@ struct SidebarView: View {
.transition(.move(edge: .bottom)) .transition(.move(edge: .bottom))
} }
} }
.onChange(of: sidebarModel.selectedFeedIdentifiers) { value in
navigate = !sidebarModel.selectedFeedIdentifiers.isEmpty
}
}
#else #else
ZStack(alignment: .top) { ZStack(alignment: .top) {
List { List {