mirror of
https://github.com/yattee/yattee.git
synced 2025-10-19 05:48:14 +00:00
Playlists support
This commit is contained in:
@@ -2,9 +2,8 @@ import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
@ObservedObject private var state = AppState()
|
||||
@StateObject private var trendingState = TrendingState()
|
||||
|
||||
@State private var tabSelection = TabSelection.popular
|
||||
@SceneStorage("tabSelection") var tabSelection = TabSelection.subscriptions
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
@@ -27,13 +26,16 @@ struct ContentView: View {
|
||||
.tabItem { Text("Trending") }
|
||||
.tag(TabSelection.trending)
|
||||
|
||||
PlaylistsView(tabSelection: $tabSelection)
|
||||
.tabItem { Text("Playlists") }
|
||||
.tag(TabSelection.playlists)
|
||||
|
||||
SearchView(tabSelection: $tabSelection)
|
||||
.tabItem { Image(systemName: "magnifyingglass") }
|
||||
.tag(TabSelection.search)
|
||||
}
|
||||
}
|
||||
.environmentObject(state)
|
||||
.environmentObject(trendingState)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
|
||||
enum TabSelection {
|
||||
case subscriptions, popular, trending, channel, search
|
||||
enum TabSelection: String {
|
||||
case subscriptions, popular, trending, playlists, channel, search
|
||||
}
|
||||
|
Reference in New Issue
Block a user