mirror of
https://github.com/yattee/yattee.git
synced 2024-11-14 01:58:24 +00:00
Fix closing video on error
This commit is contained in:
parent
a054d343a9
commit
947f216fac
@ -626,6 +626,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
func closeCurrentItem(finished: Bool = false) {
|
func closeCurrentItem(finished: Bool = false) {
|
||||||
pause()
|
pause()
|
||||||
videoBeingOpened = nil
|
videoBeingOpened = nil
|
||||||
|
advancing = false
|
||||||
forceBackendOnPlay = nil
|
forceBackendOnPlay = nil
|
||||||
|
|
||||||
closing = true
|
closing = true
|
||||||
|
@ -364,10 +364,7 @@ extension PlayerModel {
|
|||||||
message: Text(message),
|
message: Text(message),
|
||||||
primaryButton: .cancel { [weak self] in
|
primaryButton: .cancel { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
self.advancing = false
|
self.closeCurrentItem()
|
||||||
self.videoBeingOpened = nil
|
|
||||||
self.currentItem = nil
|
|
||||||
self.hide()
|
|
||||||
},
|
},
|
||||||
secondaryButton: retryButton
|
secondaryButton: retryButton
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user