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
|
||||
|
||||
var body: some View {
|
||||
if navigationStyle == .tab {
|
||||
NavigationLink(destination: ChannelPlaylistView(playlist: playlist)) { cell }
|
||||
} else {
|
||||
Button {
|
||||
NavigationModel.shared.openChannelPlaylist(playlist, navigationStyle: navigationStyle)
|
||||
} label: {
|
||||
cell
|
||||
#if os(tvOS)
|
||||
button
|
||||
#else
|
||||
if navigationStyle == .tab {
|
||||
navigationLink
|
||||
} else {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user