1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30

Don't close video on error alert until dismissed

This commit is contained in:
Arkadiusz Fal 2022-12-16 12:32:43 +01:00
parent fb22fb762c
commit 6b30e804c0

View File

@ -338,7 +338,12 @@ extension PlayerModel {
alert = Alert(
title: Text("Could not load video"),
message: Text(message),
primaryButton: .cancel(),
primaryButton: .cancel { [weak self] in
guard let self else { return }
self.advancing = false
self.videoBeingOpened = nil
self.currentItem = nil
},
secondaryButton: retryButton
)
} else {
@ -346,8 +351,5 @@ extension PlayerModel {
}
navigation.presentAlert(alert)
advancing = false
videoBeingOpened = nil
currentItem = nil
}
}