mirror of
https://github.com/yattee/yattee.git
synced 2025-04-28 16:00:33 +05:30
Fix #425
This commit is contained in:
parent
83dfdd6c0e
commit
ea997ffdb9
@ -7,6 +7,7 @@ struct ChannelsView: View {
|
|||||||
@ObservedObject private var subscriptions = SubscribedChannelsModel.shared
|
@ObservedObject private var subscriptions = SubscribedChannelsModel.shared
|
||||||
@ObservedObject private var accounts = AccountsModel.shared
|
@ObservedObject private var accounts = AccountsModel.shared
|
||||||
@ObservedObject private var feedCount = UnwatchedFeedCountModel.shared
|
@ObservedObject private var feedCount = UnwatchedFeedCountModel.shared
|
||||||
|
private var navigation = NavigationModel.shared
|
||||||
|
|
||||||
@Default(.showCacheStatus) private var showCacheStatus
|
@Default(.showCacheStatus) private var showCacheStatus
|
||||||
@Default(.showUnwatchedFeedBadges) private var showUnwatchedFeedBadges
|
@Default(.showUnwatchedFeedBadges) private var showUnwatchedFeedBadges
|
||||||
@ -15,8 +16,7 @@ struct ChannelsView: View {
|
|||||||
List {
|
List {
|
||||||
Section(header: header) {
|
Section(header: header) {
|
||||||
ForEach(subscriptions.all) { channel in
|
ForEach(subscriptions.all) { channel in
|
||||||
NavigationLink(destination: ChannelVideosView(channel: channel)) {
|
let label = HStack {
|
||||||
HStack {
|
|
||||||
if let url = channel.thumbnailURLOrCached {
|
if let url = channel.thumbnailURLOrCached {
|
||||||
ThumbnailView(url: url)
|
ThumbnailView(url: url)
|
||||||
.frame(width: 35, height: 35)
|
.frame(width: 35, height: 35)
|
||||||
@ -28,6 +28,19 @@ struct ChannelsView: View {
|
|||||||
}
|
}
|
||||||
.backport
|
.backport
|
||||||
.badge(showUnwatchedFeedBadges ? feedCount.unwatchedByChannelText(channel) : nil)
|
.badge(showUnwatchedFeedBadges ? feedCount.unwatchedByChannelText(channel) : nil)
|
||||||
|
|
||||||
|
Group {
|
||||||
|
#if os(tvOS)
|
||||||
|
Button {
|
||||||
|
navigation.openChannel(channel, navigationStyle: .tab)
|
||||||
|
} label: {
|
||||||
|
label
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
NavigationLink(destination: ChannelVideosView(channel: channel)) {
|
||||||
|
label
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
if subscriptions.isSubscribing(channel.id) {
|
if subscriptions.isSubscribing(channel.id) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user