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:
parent
0dcde5dd74
commit
a6a03ea988
|
@ -28,7 +28,7 @@ extension VideoPlayer {
|
|||
ProgressView()
|
||||
|
||||
Button {
|
||||
router.dismissCoordinator()
|
||||
router.popLast()
|
||||
} label: {
|
||||
Text(L10n.cancel)
|
||||
.foregroundColor(.red)
|
||||
|
|
|
@ -110,7 +110,7 @@ extension VideoPlayer {
|
|||
|
||||
if isPresentingOverlay && currentOverlayType == .confirmClose {
|
||||
proxy.stop()
|
||||
router.dismissCoordinator()
|
||||
router.popLast()
|
||||
} else if isPresentingOverlay && currentOverlayType == .smallMenu {
|
||||
currentOverlayType = .main
|
||||
} else {
|
||||
|
|
|
@ -60,7 +60,7 @@ struct VideoPlayer: View {
|
|||
{
|
||||
videoPlayerManager.selectNextViewModel()
|
||||
} else {
|
||||
router.dismissCoordinator()
|
||||
router.popLast()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue