mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
@@ -19,8 +19,8 @@ struct AppTabNavigation: View {
|
||||
|
||||
var body: some View {
|
||||
TabView(selection: navigation.tabSelectionBinding) {
|
||||
if visibleSections.contains(.favorites) {
|
||||
favoritesNavigationView
|
||||
if visibleSections.contains(.home) {
|
||||
homeNavigationView
|
||||
}
|
||||
|
||||
if subscriptionsVisible {
|
||||
@@ -47,16 +47,16 @@ struct AppTabNavigation: View {
|
||||
.environment(\.navigationStyle, .tab)
|
||||
}
|
||||
|
||||
private var favoritesNavigationView: some View {
|
||||
private var homeNavigationView: some View {
|
||||
NavigationView {
|
||||
LazyView(FavoritesView())
|
||||
LazyView(HomeView())
|
||||
.toolbar { toolbarContent }
|
||||
}
|
||||
.tabItem {
|
||||
Label("Favorites", systemImage: "heart.fill")
|
||||
.accessibility(label: Text("Favorites"))
|
||||
Label("Home", systemImage: "house.fill")
|
||||
.accessibility(label: Text("Home"))
|
||||
}
|
||||
.tag(TabSelection.favorites)
|
||||
.tag(TabSelection.home)
|
||||
}
|
||||
|
||||
private var subscriptionsNavigationView: some View {
|
||||
|
@@ -40,10 +40,10 @@ struct Sidebar: View {
|
||||
|
||||
var mainNavigationLinks: some View {
|
||||
Section(header: Text("Videos")) {
|
||||
if visibleSections.contains(.favorites) {
|
||||
NavigationLink(destination: LazyView(FavoritesView()), tag: TabSelection.favorites, selection: $navigation.tabSelection) {
|
||||
Label("Favorites", systemImage: "heart")
|
||||
.accessibility(label: Text("Favorites"))
|
||||
if visibleSections.contains(.home) {
|
||||
NavigationLink(destination: LazyView(HomeView()), tag: TabSelection.home, selection: $navigation.tabSelection) {
|
||||
Label("Home", systemImage: "house")
|
||||
.accessibility(label: Text("Home"))
|
||||
}
|
||||
.id("favorites")
|
||||
}
|
||||
|
Reference in New Issue
Block a user