Skip to content

Commit

Permalink
Update SDWebImage extension for 4.0+.
Browse files Browse the repository at this point in the history
  • Loading branch information
janmisar committed Mar 2, 2017
1 parent 7a19290 commit 8cdfd40
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion ACKReactiveExtensions.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Pod::Spec.new do |s|

s.subspec 'SDWebImage' do |sdwebimage|
sdwebimage.dependency 'ACKReactiveExtensions/Core'
sdwebimage.dependency 'SDWebImage'
sdwebimage.dependency 'SDWebImage', '~> 4.0'
sdwebimage.source_files = 'ACKReactiveExtensions/SDWebImage/**/*'
end

Expand Down
8 changes: 6 additions & 2 deletions ACKReactiveExtensions/SDWebImage/SDWebImage+RAC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ extension Reactive where Base: SDWebImageDownloader {
sink.sendCompleted()
}
disposable.add({
task?.cancel()
if let token = task?.downloadOperationCancelToken as? SDWebImageDownloadToken {
self.base.cancel(token)
}
})
}
}
Expand Down Expand Up @@ -55,7 +57,9 @@ extension SDWebImageDownloader {
sink.sendCompleted()
}
disposable.add({
task?.cancel()
if let token = task?.downloadOperationCancelToken as? SDWebImageDownloadToken {
self.cancel(token)
}
})
}
}
Expand Down
60 changes: 30 additions & 30 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
PODS:
- ACKReactiveExtensions (2.2.2):
- ACKReactiveExtensions/Core (= 2.2.2)
- ACKReactiveExtensions/UIKit (= 2.2.2)
- ReactiveCocoa (~> 5.0.0-rc.1)
- ACKReactiveExtensions/Argo (2.2.2):
- ACKReactiveExtensions (2.3.0):
- ACKReactiveExtensions/Core (= 2.3.0)
- ACKReactiveExtensions/UIKit (= 2.3.0)
- ReactiveCocoa (~> 5.0)
- ACKReactiveExtensions/Argo (2.3.0):
- Argo (~> 4.0)
- ReactiveCocoa (~> 5.0.0-rc.1)
- ACKReactiveExtensions/Core (2.2.2):
- ReactiveCocoa (~> 5.0.0-rc.1)
- ACKReactiveExtensions/Reachability (2.2.2):
- ReactiveCocoa (~> 5.0)
- ACKReactiveExtensions/Core (2.3.0):
- ReactiveCocoa (~> 5.0)
- ACKReactiveExtensions/Reachability (2.3.0):
- ACKReactiveExtensions/Core
- Reachability
- ReactiveCocoa (~> 5.0.0-rc.1)
- ACKReactiveExtensions/Realm (2.2.2):
- ReactiveCocoa (~> 5.0)
- ACKReactiveExtensions/Realm (2.3.0):
- ACKReactiveExtensions/Core
- ReactiveCocoa (~> 5.0.0-rc.1)
- ReactiveCocoa (~> 5.0)
- RealmSwift (~> 2.1)
- ACKReactiveExtensions/SDWebImage (2.2.2):
- ACKReactiveExtensions/SDWebImage (2.3.0):
- ACKReactiveExtensions/Core
- ReactiveCocoa (~> 5.0.0-rc.1)
- ReactiveCocoa (~> 5.0)
- SDWebImage
- ACKReactiveExtensions/UIKit (2.2.2):
- ACKReactiveExtensions/UIKit (2.3.0):
- ACKReactiveExtensions/Core
- ReactiveCocoa (~> 5.0.0-rc.1)
- ACKReactiveExtensions/WebKit (2.2.2):
- ReactiveCocoa (~> 5.0)
- ACKReactiveExtensions/WebKit (2.3.0):
- ACKReactiveExtensions/Core
- ReactiveCocoa (~> 5.0.0-rc.1)
- ReactiveCocoa (~> 5.0)
- Argo (4.1.1):
- Runes (>= 4.0.0)
- Nimble (5.1.1)
- Quick (0.10.0)
- Reachability (3.2)
- ReactiveCocoa (5.0.0-rc.1):
- ReactiveSwift (~> 1.0.0-rc.3)
- ReactiveSwift (1.0.0):
- ReactiveCocoa (5.0.1):
- ReactiveSwift (~> 1.1)
- ReactiveSwift (1.1.0):
- Result (~> 3.1)
- Realm (2.1.2):
- Realm/Headers (= 2.1.2)
Expand All @@ -42,9 +42,9 @@ PODS:
- Realm (= 2.1.2)
- Result (3.1.0)
- Runes (4.0.1)
- SDWebImage (3.8.2):
- SDWebImage/Core (= 3.8.2)
- SDWebImage/Core (3.8.2)
- SDWebImage (4.0.0):
- SDWebImage/Core (= 4.0.0)
- SDWebImage/Core (4.0.0)

DEPENDENCIES:
- ACKReactiveExtensions (from `../`)
Expand All @@ -59,22 +59,22 @@ DEPENDENCIES:

EXTERNAL SOURCES:
ACKReactiveExtensions:
:path: ../
:path: "../"

SPEC CHECKSUMS:
ACKReactiveExtensions: c9b0a363ba76fe47dfdb074fb7da40ef988f0bf7
ACKReactiveExtensions: 19813af5a953c3d48f6aa553c28350e5730d52c5
Argo: 014ac072f97462bc1a9b83d302edb351488a532f
Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29
Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
ReactiveCocoa: 3e9cad4b77fa199d41e03f603cb55d0701ad6ad8
ReactiveSwift: f391724ee318a2cfd3e37dfb041cd49ecf4e7869
ReactiveCocoa: f577006aa6c7b0b08020109ebaae3b77ada00adc
ReactiveSwift: 2f4e4a02e5a5c87ea63f5fe667163ce2a67cbb57
Realm: efe855f4d977c8ce5a82d3116d9f1ff155a6550c
RealmSwift: 17d6ee30b6f9df86364408c2197492e33bfea567
Result: 4e3ed5995ed94d0cd6a09be9a431fce3f3624bbf
Runes: ff20f163b478ac2c0e18158d6086fd5b1997f983
SDWebImage: 098e97e6176540799c27e804c96653ee0833d13c
SDWebImage: 76a6348bdc74eb5a55dd08a091ef298e56b55e41

PODFILE CHECKSUM: 1ed247216cfa78d69af7c9aed3f2ed92db7fcd17

COCOAPODS: 1.2.0.rc.1
COCOAPODS: 1.2.0

0 comments on commit 8cdfd40

Please sign in to comment.