mirror of
https://github.com/yattee/yattee.git
synced 2025-08-08 19:54:07 +00:00
Extended Piped support
This commit is contained in:
@@ -32,15 +32,15 @@ struct AccountSelectionView: View {
|
||||
.id(UUID())
|
||||
}
|
||||
|
||||
var allAccounts: [Instance.Account] {
|
||||
var allAccounts: [Account] {
|
||||
accounts + instances.map(\.anonymousAccount)
|
||||
}
|
||||
|
||||
private var nextAccount: Instance.Account? {
|
||||
private var nextAccount: Account? {
|
||||
allAccounts.next(after: accountsModel.current)
|
||||
}
|
||||
|
||||
func accountButtonTitle(account: Instance.Account! = nil) -> String {
|
||||
func accountButtonTitle(account: Account! = nil) -> String {
|
||||
guard account != nil else {
|
||||
return "Not selected"
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ import Defaults
|
||||
import SwiftUI
|
||||
|
||||
struct TVNavigationView: View {
|
||||
@EnvironmentObject<AccountsModel> private var accounts
|
||||
@EnvironmentObject<PlayerModel> private var player
|
||||
@EnvironmentObject<NavigationModel> private var navigation
|
||||
@EnvironmentObject<RecentsModel> private var recents
|
||||
@@ -13,21 +14,27 @@ struct TVNavigationView: View {
|
||||
.tabItem { Text("Watch Now") }
|
||||
.tag(TabSelection.watchNow)
|
||||
|
||||
SubscriptionsView()
|
||||
.tabItem { Text("Subscriptions") }
|
||||
.tag(TabSelection.subscriptions)
|
||||
if accounts.app.supportsSubscriptions {
|
||||
SubscriptionsView()
|
||||
.tabItem { Text("Subscriptions") }
|
||||
.tag(TabSelection.subscriptions)
|
||||
}
|
||||
|
||||
PopularView()
|
||||
.tabItem { Text("Popular") }
|
||||
.tag(TabSelection.popular)
|
||||
if accounts.app.supportsPopular {
|
||||
PopularView()
|
||||
.tabItem { Text("Popular") }
|
||||
.tag(TabSelection.popular)
|
||||
}
|
||||
|
||||
TrendingView()
|
||||
.tabItem { Text("Trending") }
|
||||
.tag(TabSelection.trending)
|
||||
|
||||
PlaylistsView()
|
||||
.tabItem { Text("Playlists") }
|
||||
.tag(TabSelection.playlists)
|
||||
if accounts.app.supportsUserPlaylists {
|
||||
PlaylistsView()
|
||||
.tabItem { Text("Playlists") }
|
||||
.tag(TabSelection.playlists)
|
||||
}
|
||||
|
||||
NowPlayingView()
|
||||
.tabItem { Text("Now Playing") }
|
||||
|
Reference in New Issue
Block a user