diff --git a/Yattee/Services/API/InvidiousAPI.swift b/Yattee/Services/API/InvidiousAPI.swift index 29eb04b4..f8252648 100644 --- a/Yattee/Services/API/InvidiousAPI.swift +++ b/Yattee/Services/API/InvidiousAPI.swift @@ -1432,7 +1432,9 @@ private struct InvidiousRecommendedVideo: Decodable, Sendable { id: .global(videoId), title: title, description: nil, - author: Author(id: authorId, name: author), + // An empty authorId (unlinked recommendation author) can't open a + // channel, so it hides Go to Channel instead of failing to load. + author: Author(id: authorId, name: author, hasRealChannelInfo: !authorId.isEmpty), duration: TimeInterval(lengthSeconds), publishedAt: nil, publishedText: nil, diff --git a/Yattee/Services/API/YatteeServerAPI.swift b/Yattee/Services/API/YatteeServerAPI.swift index debef250..76a13401 100644 --- a/Yattee/Services/API/YatteeServerAPI.swift +++ b/Yattee/Services/API/YatteeServerAPI.swift @@ -807,7 +807,9 @@ private struct YatteeRecommendedVideo: Decodable, Sendable { id: .global(videoId), title: title, description: nil, - author: Author(id: authorId, name: author), + // An empty authorId (unlinked recommendation author) can't open a + // channel, so it hides Go to Channel instead of failing to load. + author: Author(id: authorId, name: author, hasRealChannelInfo: !authorId.isEmpty), duration: TimeInterval(lengthSeconds), publishedAt: nil, publishedText: nil, diff --git a/Yattee/Views/Components/VideoContextMenu.swift b/Yattee/Views/Components/VideoContextMenu.swift index 2454465c..ca05c0cd 100644 --- a/Yattee/Views/Components/VideoContextMenu.swift +++ b/Yattee/Views/Components/VideoContextMenu.swift @@ -370,13 +370,9 @@ struct VideoContextMenuContent: View { // Video Info Button { - // Dismiss player if in player context - if context == .player { - // Set collapsing first so mini player shows video immediately - appEnvironment?.navigationCoordinator.isPlayerCollapsing = true - appEnvironment?.navigationCoordinator.isPlayerExpanded = false - } - appEnvironment?.navigationCoordinator.navigate(to: .video(.loaded(video))) + // Collapses the expanded player (also for related/queue rows + // shown inside it) so the pushed screen isn't left underneath. + appEnvironment?.navigationCoordinator.navigateToOpenedLink(.video(.loaded(video))) } label: { Label(String(localized: "video.context.info"), systemImage: "info.circle") } @@ -384,7 +380,10 @@ struct VideoContextMenuContent: View { // Go to channel (hidden for media browser, or when no real channel info) if showGoToChannel && video.author.hasRealChannelInfo { Button { - appEnvironment?.navigationCoordinator.navigateToChannel(for: video, collapsePlayer: context == .player) + appEnvironment?.navigationCoordinator.navigateToChannel( + for: video, + collapsePlayer: appEnvironment?.navigationCoordinator.isPlayerExpanded == true + ) } label: { Label(String(localized: "video.context.goToChannel"), systemImage: "person.circle") }