Skip to content

Commit

Permalink
Switch pull revision back to >=
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Apr 24, 2023
1 parent a3fe1ed commit 7e3f0c6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Sources/ParseCareKit/ParseRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,9 @@ public class ParseRemote: OCKRemoteSynchronizable {

// 3. Pull the latest revisions from the remote.
let localClock = knowledgeVector.clock(for: self.uuid)
let query: Query<PCKRevisionRecord>!
if localClock > 0 {
query = PCKRevisionRecord.query(ObjectableKey.logicalClock > localClock,
let query = PCKRevisionRecord.query(ObjectableKey.logicalClock >= localClock,
ObjectableKey.clockUUID == self.uuid)
.order([.ascending(ObjectableKey.logicalClock)])
} else {
query = PCKRevisionRecord.query(ObjectableKey.logicalClock >= localClock,
ObjectableKey.clockUUID == self.uuid)
.order([.ascending(ObjectableKey.logicalClock)])
}
.order([.ascending(ObjectableKey.logicalClock)])
do {
let revisions = try await query.find()
self.notifyRevisionProgress(0,
Expand Down

0 comments on commit 7e3f0c6

Please sign in to comment.