diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift index 05e2e690..883d0db3 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/BaseCancellable.swift @@ -21,9 +21,8 @@ // import Moya -import TIFoundationUtils -open class BaseCancellable: Cancellable, CancellableTask { +open class BaseCancellable: Cancellable { private(set) public var isCancelled = false open func cancel() { diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift index 87955661..a9f65d2b 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellables.swift @@ -22,7 +22,6 @@ import Moya import TISwiftUtils -import TIFoundationUtils public struct Cancellables { public static func nonCancellable() -> Cancellable { @@ -32,8 +31,4 @@ public struct Cancellables { public static func scoped(scopeCancellableClosure: ScopeCancellable.ScopeCancellableClosure) -> Cancellable { ScopeCancellable(scopeCancellableClosure: scopeCancellableClosure) } - - public static func nonCancellableTask() -> CancellableTask { - NonCancellable() - } } diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift index 0d3c457a..7af2d062 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift @@ -21,11 +21,12 @@ // import Moya -import TIFoundationUtils -public struct NonCancellable: Cancellable, CancellableTask { +public struct NonCancellable: Cancellable { public let isCancelled = true + public init() {} + public func cancel() { // nothing }