crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit ecdf12a8168935f6f10e0fd4f1d682fec6ca0a84
parent f825da95cdabf750217d4cac1719479421f84258
Author: Michael Camilleri <[email protected]>
Date:   Tue,  2 Jun 2026 00:37:15 +0900

Fix Swift Concurrency warnings

Diffstat:
MCrossmate/Services/AppServices.swift | 3++-
MCrossmate/Services/NYTPuzzleUpgrader.swift | 2--
MCrossmate/Views/FriendPickerView.swift | 2+-
MCrossmate/Views/GameShareItem.swift | 2+-
4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Crossmate/Services/AppServices.swift b/Crossmate/Services/AppServices.swift @@ -1429,9 +1429,10 @@ final class AppServices { // No local journal for these — this device never played them, so there // is nothing to publish. Mark them done so the sweep stops reconsidering. + let toMark = nothingToUpload ctx.performAndWait { let req = NSFetchRequest<GameEntity>(entityName: "GameEntity") - req.predicate = NSPredicate(format: "id IN %@", nothingToUpload) + req.predicate = NSPredicate(format: "id IN %@", toMark) for game in (try? ctx.fetch(req)) ?? [] { game.journalUploaded = true } diff --git a/Crossmate/Services/NYTPuzzleUpgrader.swift b/Crossmate/Services/NYTPuzzleUpgrader.swift @@ -140,8 +140,6 @@ enum NYTPuzzleUpgrader { return "cell(r=\(row),c=\(col)) old=block new=open" case (.open, .block): return "cell(r=\(row),c=\(col)) old=open new=block" - default: - return "cell(r=\(row),c=\(col)) kind mismatch" } } } diff --git a/Crossmate/Views/FriendPickerView.swift b/Crossmate/Views/FriendPickerView.swift @@ -99,7 +99,7 @@ struct FriendPickerView: View { defer { withAnimation(.snappy) { invitingAuthorID = nil } } do { try await inviteFriend(gameID, authorID) - withAnimation(.snappy) { invitedAuthorIDs.insert(authorID) } + withAnimation(.snappy) { _ = invitedAuthorIDs.insert(authorID) } } catch { errorMessage = String(describing: error) } diff --git a/Crossmate/Views/GameShareItem.swift b/Crossmate/Views/GameShareItem.swift @@ -208,7 +208,7 @@ struct GameShareSheet: View { do { try await inviteFriend(gameID, authorID) - withAnimation(.snappy) { invitedAuthorIDs.insert(authorID) } + withAnimation(.snappy) { _ = invitedAuthorIDs.insert(authorID) } } catch { errorMessage = describe(error) }