Fix favorite channel button on tvOS

This commit is contained in:
Arkadiusz Fal 2023-02-26 19:14:06 +01:00
parent 4697aa9696
commit d58026bcef

View File

@ -63,6 +63,8 @@ struct ChannelVideosView: View {
viewsLabel
subscriptionToggleButton
favoriteButton
.labelStyle(.iconOnly)
}
contentTypePicker
.pickerStyle(.automatic)
@ -159,9 +161,7 @@ struct ChannelVideosView: View {
}
ToolbarItem {
if let presentedChannel {
FavoriteButton(item: FavoriteItem(section: .channel(accounts.app.appType.rawValue, presentedChannel.id, presentedChannel.name)))
}
favoriteButton
}
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 {
ChannelAvatarView(channel: store.item)
#if os(tvOS)