Debrid: Fix cleanup of unrestrict and task
The task can be set to nil after completion, and the unrestrict flag should also be set to nil when the batch sheet is dismissed. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
e14c684b5f
commit
aa0712b967
2 changed files with 2 additions and 0 deletions
|
|
@ -375,6 +375,7 @@ class DebridManager: ObservableObject {
|
|||
defer {
|
||||
logManager?.hideIndeterminateToast()
|
||||
requiresUnrestrict = false
|
||||
currentDebridTask = nil
|
||||
}
|
||||
|
||||
logManager?.updateIndeterminateToast("Loading content", cancelAction: {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ struct BatchChoiceView: View {
|
|||
try? await Task.sleep(seconds: 1)
|
||||
|
||||
debridManager.clearSelectedDebridItems()
|
||||
debridManager.requiresUnrestrict = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue