Call downloadProgress.clear().

This commit is contained in:
Brent Simmons
2024-05-26 23:05:35 -07:00
parent ede43bb368
commit 9864bd576c

View File

@@ -67,7 +67,7 @@ public protocol DownloadSessionDelegate: AnyObject {
public func cancelAll() async {
clearDownloadProgress()
downloadProgress.clear()
let (dataTasks, uploadTasks, downloadTasks) = await urlSession.tasks
@@ -254,7 +254,7 @@ private extension DownloadSession {
if tasksInProgress.count + tasksPending.count + queue.count < 1 { // Finished?
allIdentifiers = Set<String>()
delegate?.downloadSessionDidComplete(self)
clearDownloadProgress()
downloadProgress.clear()
}
}
@@ -263,11 +263,6 @@ private extension DownloadSession {
downloadProgress.numberRemaining = tasksInProgress.count + tasksPending.count + queue.count
}
func clearDownloadProgress() {
downloadProgress = DownloadProgress(numberOfTasks: 0)
}
static let badRedirectStrings = ["solutionip", "lodgenet", "monzoon", "landingpage", "btopenzone", "register", "login", "authentic"]
func urlStringIsDisallowedRedirect(_ urlString: String) -> Bool {