mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 13:50:32 +05:30
Fix #467
This commit is contained in:
parent
02a29e5d07
commit
b16eae3d88
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user