mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-15 01:33:25 +01:00
[AltStore] Improves app installation cancellation/progress tracking
This commit is contained in:
@@ -25,6 +25,8 @@ class AppOperationContext
|
||||
var resignedFileURL: URL?
|
||||
var connection: NWConnection?
|
||||
|
||||
var isFinished = false
|
||||
|
||||
var error: Error? {
|
||||
get {
|
||||
return _error ?? self.group.error
|
||||
|
||||
@@ -23,7 +23,14 @@ class ResultOperation<ResultType>: Operation
|
||||
{
|
||||
guard !self.isFinished else { return }
|
||||
|
||||
self.resultHandler?(result)
|
||||
if self.isCancelled
|
||||
{
|
||||
self.resultHandler?(.failure(OperationError.cancelled))
|
||||
}
|
||||
else
|
||||
{
|
||||
self.resultHandler?(result)
|
||||
}
|
||||
|
||||
super.finish()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user