|
|
@@ -145,6 +145,12 @@ extension KFImage {
|
|
|
loading = false
|
|
|
}
|
|
|
|
|
|
+ /// Restores the download task priority to default if it is in progress.
|
|
|
+ func restorePriorityOnAppear() {
|
|
|
+ guard let downloadTask = downloadTask, loading == true else { return }
|
|
|
+ downloadTask.sessionTask.task.priority = URLSessionTask.defaultPriority
|
|
|
+ }
|
|
|
+
|
|
|
/// Reduce the download task priority if it is in progress.
|
|
|
func reducePriorityOnDisappear() {
|
|
|
guard let downloadTask = downloadTask, loading == true else { return }
|