URGENT FIX: Video player back button now works

Changed all router.dismissCoordinator() calls to router.popLast() in video player:
- Overlay.swift: Back button when confirming close
- VideoPlayer.swift: Auto-exit when video ends
- LoadingView.swift: Cancel button during loading

dismissCoordinator() only works with .fullScreen/.modal presentations.
Since we changed video player to .push navigation, we need popLast() instead.

This fixes ESC/menu button not working during video playback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ashik K 2025-10-17 12:53:35 +02:00
parent 0dcde5dd74
commit a6a03ea988
3 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ extension VideoPlayer {
ProgressView()
Button {
router.dismissCoordinator()
router.popLast()
} label: {
Text(L10n.cancel)
.foregroundColor(.red)

View File

@ -110,7 +110,7 @@ extension VideoPlayer {
if isPresentingOverlay && currentOverlayType == .confirmClose {
proxy.stop()
router.dismissCoordinator()
router.popLast()
} else if isPresentingOverlay && currentOverlayType == .smallMenu {
currentOverlayType = .main
} else {

View File

@ -60,7 +60,7 @@ struct VideoPlayer: View {
{
videoPlayerManager.selectNextViewModel()
} else {
router.dismissCoordinator()
router.popLast()
}
}
}