Fix closing video on error

This commit is contained in:
Arkadiusz Fal 2023-05-26 23:20:45 +02:00
parent a054d343a9
commit 947f216fac
2 changed files with 2 additions and 4 deletions

View File

@ -626,6 +626,7 @@ final class PlayerModel: ObservableObject {
func closeCurrentItem(finished: Bool = false) {
pause()
videoBeingOpened = nil
advancing = false
forceBackendOnPlay = nil
closing = true

View File

@ -364,10 +364,7 @@ extension PlayerModel {
message: Text(message),
primaryButton: .cancel { [weak self] in
guard let self else { return }
self.advancing = false
self.videoBeingOpened = nil
self.currentItem = nil
self.hide()
self.closeCurrentItem()
},
secondaryButton: retryButton
)