Consolidate cancel code
This commit is contained in:
parent
ff3a3e827d
commit
ebf41a3b01
|
@ -263,8 +263,9 @@
|
||||||
@synchronized (self) {
|
@synchronized (self) {
|
||||||
[self.prefetchOperations compact];
|
[self.prefetchOperations compact];
|
||||||
for (id operation in self.prefetchOperations) {
|
for (id operation in self.prefetchOperations) {
|
||||||
SDAsyncBlockOperation *asyncBlockOperation = operation;
|
if ([operation conformsToProtocol:@protocol(SDWebImageOperation)]) {
|
||||||
[asyncBlockOperation cancel];
|
[operation cancel];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.prefetchOperations.count = 0;
|
self.prefetchOperations.count = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue