Skip to content

Commit

Permalink
LiveQuery only responds to created revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Apr 22, 2023
1 parent 7784b4c commit 1ff1cf6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/ParseCareKit/Models/PCKRevisionRecord.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ struct PCKRevisionRecord: ParseObject, Equatable, Codable {
}

func save(options: API.Options = []) async throws {
try await self.create(options: options)
try await patients.createAll(options: options)
try await carePlans.createAll(options: options)
try await contacts.createAll(options: options)
try await tasks.createAll(options: options)
try await healthKitTasks.createAll(options: options)
try await outcomes.createAll(options: options)
try await self.create(options: options)
}

func fetchEntities(options: API.Options = []) async throws -> Self {
Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseCareKit/ParseRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public class ParseRemote: OCKRemoteSynchronizable {
self.revisionRecordSubscription = try await self.revisionRecordQuery.subscribeCallback()
self.revisionRecordSubscription?.handleEvent { (_, event) in
switch event {
case .created(let updatedRevision), .entered(let updatedRevision), .updated(let updatedRevision):
case .created(let updatedRevision):
guard let logicalClock = updatedRevision.logicalClock else {
Logger
.revisionRecordSubscription
Expand Down

0 comments on commit 1ff1cf6

Please sign in to comment.