File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2320,12 +2320,21 @@ - (void)removeObjectForKey:(NSString *)key {
2320
2320
- (void )revert {
2321
2321
@synchronized (lock) {
2322
2322
if ([self isDirty ]) {
2323
+ NSMutableArray *removedKeys = [NSMutableArray array ];
2324
+ [removedKeys addObjectsFromArray: [self allKeys ]];
2325
+ for (PFOperationSet *operationSet in operationSetQueue) {
2326
+ for (NSString *key in operationSet.keyEnumerator ) {
2327
+ [removedKeys addObject: key];
2328
+ }
2329
+ }
2330
+
2323
2331
PFOperationSet *changes = [self unsavedChanges ];
2324
2332
for (NSString *key in changes.keyEnumerator ) {
2325
2333
[changes removeObjectForKey: key];
2326
2334
}
2335
+
2327
2336
[self rebuildEstimatedData ];
2328
- [_availableKeys removeAllObjects ];
2337
+ [_availableKeys minusSet: [ NSSet setWithArray: removedKeys] ];
2329
2338
[self checkpointAllMutableContainers ];
2330
2339
}
2331
2340
}
You can’t perform that action at this time.
0 commit comments