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:
Blake Watters
2012-12-21 16:00:43 -05:00
parent 0f02687224
commit 929cd44bd7
2 changed files with 6 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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