Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Apr 25, 2023
1 parent 0b06329 commit 39c66ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 1 addition & 3 deletions Sources/ParseCareKit/Models/RemoteSynchronizing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ actor RemoteSynchronizing {
guard let currentVector = knowledgeVector else {
return true
}
var testVector = currentVector
testVector.merge(with: vector)
return vector > currentVector || testVector.uuids.count > currentVector.uuids.count
return vector > currentVector
}
}
7 changes: 0 additions & 7 deletions Sources/ParseCareKit/ParseRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,7 @@ public class ParseRemote: OCKRemoteSynchronizable {
}

// 10. Save updated clock to the remote and notify peer that sync is complete.
let hasNewerClock = await self.remoteStatus.hasNewerVector(updatedParseVector)
await self.remoteStatus.updateClock(updatedClock)
guard shouldIncrementClock || hasNewerClock else {
await self.remoteStatus.notSynchronzing()
await self.subscribeToClock()
completion(nil)
return
}
do {
_ = try await updatedClock.save()
Logger.pushRevisions.debug("Finished pushing revisions")
Expand Down

0 comments on commit 39c66ac

Please sign in to comment.