Adds AddSourceViewController to add sources by URL or from list of recommended sources

This commit is contained in:
Riley Testut
2023-10-18 18:56:40 -05:00
committed by Magesh K
parent 2aebaf80e0
commit 98125e93aa
13 changed files with 1096 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ final class FetchSourceOperation: ResultOperation<Source>
private var source: Source?
private let session: URLSession
private weak var dataTask: URLSessionDataTask?
private lazy var dateFormatter: ISO8601DateFormatter = {
let dateFormatter = ISO8601DateFormatter()
@@ -54,6 +55,13 @@ final class FetchSourceOperation: ResultOperation<Source>
self.session = URLSession(configuration: configuration)
}
override func cancel()
{
super.cancel()
self.dataTask?.cancel()
}
override func main()
{
super.main()
@@ -144,6 +152,8 @@ final class FetchSourceOperation: ResultOperation<Source>
self.progress.addChild(dataTask.progress, withPendingUnitCount: 1)
dataTask.resume()
self.dataTask = dataTask
}
}