mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Adds AddSourceViewController to add sources by URL or from list of recommended sources
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user