mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
Undo previous paginator change. Instead, pass a reference to the operation queue from the RKObjectManager to any Paginator objects constructed through the manager. refs #1076
This commit is contained in:
@@ -526,6 +526,7 @@ static NSString *RKMIMETypeFromAFHTTPClientParameterEncoding(AFHTTPClientParamet
|
||||
paginator.managedObjectContext = self.managedObjectStore.mainQueueManagedObjectContext;
|
||||
paginator.managedObjectCache = self.managedObjectStore.managedObjectCache;
|
||||
paginator.fetchRequestBlocks = self.fetchRequestBlocks;
|
||||
paginator.operationQueue = self.operationQueue;
|
||||
return paginator;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ static NSUInteger RKPaginatorDefaultPerPage = 25;
|
||||
self.objectCount = NSNotFound;
|
||||
self.perPage = RKPaginatorDefaultPerPage;
|
||||
self.loaded = NO;
|
||||
self.operationQueue = [NSOperationQueue new];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -209,7 +208,11 @@ static NSUInteger RKPaginatorDefaultPerPage = 25;
|
||||
}
|
||||
}];
|
||||
|
||||
[self.operationQueue addOperation:self.objectRequestOperation];
|
||||
if (self.operationQueue) {
|
||||
[self.operationQueue addOperation:self.objectRequestOperation];
|
||||
} else {
|
||||
[self.objectRequestOperation start];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)waitUntilFinished
|
||||
|
||||
Reference in New Issue
Block a user