File tree 1 file changed +5
-13
lines changed
1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -389,22 +389,14 @@ public class ParseRemote: OCKRemoteSynchronizable {
389
389
localClock: OCKRevisionRecord . KnowledgeVector ,
390
390
completion: @escaping ( Error ? ) -> Void ) {
391
391
Task {
392
- guard shouldIncrementClock else {
393
- await self . remoteStatus. updateClock ( parseClock)
394
- await self . remoteStatus. notSynchronzing ( )
395
- Logger . pushRevisions. debug ( " Finished pushing revisions " )
396
- DispatchQueue . main. async {
397
- self . parseRemoteDelegate? . successfullyPushedDataToCloud ( )
398
- }
399
- completion ( nil )
400
- return
401
- }
402
392
var updatedParseVector = parseVector
403
- // Increment and merge Knowledge Vector
404
- updatedParseVector = incrementVectorClock ( updatedParseVector)
393
+ if shouldIncrementClock {
394
+ // Increment Knowledge Vector
395
+ updatedParseVector = incrementVectorClock ( updatedParseVector)
396
+ }
405
397
updatedParseVector. merge ( with: localClock)
398
+
406
399
guard let updatedClock = PCKClock . encodeVector ( updatedParseVector, for: parseClock) else {
407
- await self . remoteStatus. updateClock ( parseClock) // revert
408
400
await self . remoteStatus. notSynchronzing ( )
409
401
Logger . pushRevisions. error ( " Could not encode clock " )
410
402
completion ( ParseCareKitError . couldntUnwrapClock)
You can’t perform that action at this time.
0 commit comments