mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 05:40:32 +05:30
Fix favorite channel button on tvOS
This commit is contained in:
parent
4697aa9696
commit
d58026bcef
@ -63,6 +63,8 @@ struct ChannelVideosView: View {
|
|||||||
viewsLabel
|
viewsLabel
|
||||||
|
|
||||||
subscriptionToggleButton
|
subscriptionToggleButton
|
||||||
|
favoriteButton
|
||||||
|
.labelStyle(.iconOnly)
|
||||||
}
|
}
|
||||||
contentTypePicker
|
contentTypePicker
|
||||||
.pickerStyle(.automatic)
|
.pickerStyle(.automatic)
|
||||||
@ -159,9 +161,7 @@ struct ChannelVideosView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
if let presentedChannel {
|
favoriteButton
|
||||||
FavoriteButton(item: FavoriteItem(section: .channel(accounts.app.appType.rawValue, presentedChannel.id, presentedChannel.name)))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
@ -211,6 +211,12 @@ struct ChannelVideosView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ViewBuilder var favoriteButton: some View {
|
||||||
|
if let presentedChannel {
|
||||||
|
FavoriteButton(item: FavoriteItem(section: .channel(accounts.app.appType.rawValue, presentedChannel.id, presentedChannel.name)))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var thumbnail: some View {
|
var thumbnail: some View {
|
||||||
ChannelAvatarView(channel: store.item)
|
ChannelAvatarView(channel: store.item)
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user