1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 13:50:32 +05:30
This commit is contained in:
Arkadiusz Fal 2023-05-22 23:07:14 +02:00
parent 02a29e5d07
commit b16eae3d88

View File

@ -7,16 +7,28 @@ struct ChannelPlaylistCell: View {
@Environment(\.navigationStyle) private var navigationStyle @Environment(\.navigationStyle) private var navigationStyle
var body: some View { var body: some View {
if navigationStyle == .tab { #if os(tvOS)
NavigationLink(destination: ChannelPlaylistView(playlist: playlist)) { cell } button
} else { #else
Button { if navigationStyle == .tab {
NavigationModel.shared.openChannelPlaylist(playlist, navigationStyle: navigationStyle) navigationLink
} label: { } else {
cell button
} }
.buttonStyle(.plain) #endif
}
var navigationLink: some View {
NavigationLink(destination: ChannelPlaylistView(playlist: playlist)) { cell }
}
var button: some View {
Button {
NavigationModel.shared.openChannelPlaylist(playlist, navigationStyle: navigationStyle)
} label: {
cell
} }
.buttonStyle(.plain)
} }
var cell: some View { var cell: some View {