This repository was archived by the owner on Jan 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
ParseUI/Classes/QueryTableViewController Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#import " PFQueryTableViewController.h"
23
23
24
- #import < Parse/PFQuery .h>
24
+ #import < Parse/Parse .h>
25
25
26
26
#import " PFActivityIndicatorTableViewCell.h"
27
27
#import " PFImageView.h"
@@ -158,7 +158,7 @@ - (PFQuery *)queryForTable {
158
158
159
159
// If no objects are loaded in memory, we look to the cache first to fill the table
160
160
// and then subsequently do a query against the network.
161
- if ([self .objects count ] == 0 ) {
161
+ if ([self .objects count ] == 0 && ![Parse isLocalDatastoreEnabled ] ) {
162
162
query.cachePolicy = kPFCachePolicyCacheThenNetwork ;
163
163
}
164
164
@@ -192,7 +192,9 @@ - (void)loadObjects:(NSInteger)page clear:(BOOL)clear {
192
192
PFQuery *query = [self queryForTable ];
193
193
[self _alterQuery: query forLoadingPage: page];
194
194
[query findObjectsInBackgroundWithBlock: ^(NSArray *foundObjects, NSError *error) {
195
- if (query.cachePolicy != kPFCachePolicyCacheOnly && error.code == kPFErrorCacheMiss ) {
195
+ if (![Parse isLocalDatastoreEnabled ] &&
196
+ query.cachePolicy != kPFCachePolicyCacheOnly &&
197
+ error.code == kPFErrorCacheMiss ) {
196
198
// no-op on cache miss
197
199
return ;
198
200
}
You can’t perform that action at this time.
0 commit comments