Push channel onto nav stack from tvOS details panel

The "View Channel" button in the tvOS video details panel only dismissed
the player; the channel was never pushed. Delegate to
NavigationCoordinator.navigateToChannel(for:collapsePlayer:) so
UnifiedTabView's pendingNavigation observer appends the destination,
matching iOS behavior and handling extracted/media-source cases.
This commit is contained in:
Arkadiusz Fal
2026-04-15 04:55:09 +02:00
parent c3de87a12e
commit 7067413b9b

View File

@@ -198,7 +198,7 @@ struct TVDetailsPanel: View {
Button { Button {
// Navigate to channel // Navigate to channel
if let video { if let video {
navigateToChannel(video.author) navigateToChannel(for: video)
} }
} label: { } label: {
Text(String(localized: "channel.view")) Text(String(localized: "channel.view"))
@@ -284,13 +284,9 @@ struct TVDetailsPanel: View {
// MARK: - Navigation // MARK: - Navigation
private func navigateToChannel(_ author: Author) { private func navigateToChannel(for video: Video) {
// Close the player and navigate to channel
onDismiss() onDismiss()
appEnvironment?.navigationCoordinator.isPlayerExpanded = false appEnvironment?.navigationCoordinator.navigateToChannel(for: video, collapsePlayer: true)
// Navigate to channel view
// This would need to be implemented based on your navigation system
} }
} }