← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

git clone https://code.inqk.net/crossmate.git


commit 75b0b776f45cc97eef42c9154743feb771211edc
parent e27c5b5001169bab53a38f70ef51215f3994f6e1
Author: Michael Camilleri <[email protected]>
Date:   Sun, 10 May 2026 14:51:32 +0900

Include Player records in fallback fetch

Diffstat

MCrossmate/Sync/SyncEngine.swift | 7++++++-

1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Crossmate/Sync/SyncEngine.swift b/Crossmate/Sync/SyncEngine.swift

@@ -386,7 +386,7 @@ actor SyncEngine {
     /// or record-zone events until a later foreground fetch. This direct pull
     /// trades token efficiency for latency: it asks CloudKit for modified
     /// zones in the notified database scope from a nil token and applies the
-    /// returned Game/Moves records through the same idempotent merge path
+    /// returned Game/Moves/Player records through the same idempotent merge path
     /// used by CKSyncEngine events. Event-like records such as Ping are
     /// intentionally ignored here because a nil-token fetch can redeliver old
     /// records. CKSyncEngine remains the owner of durable tokens and will
@@ -525,6 +525,11 @@ actor SyncEngine {
                         movesUpdated.insert(value.gameID)
                         affected.insert(value.gameID)
                     }
+                case "Player":
+                    if let (gameID, _) = RecordSerializer.parsePlayerRecordName(record.recordID.recordName) {
+                        self.applyPlayerRecord(record, in: ctx)
+                        affected.insert(gameID)
+                    }
                 default:
                     break
                 }