← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

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


commit 2630a38983f33da7b1726c30488c9f55c07bdb87
parent 2738ef2a2d0a1768e78945d724d620c2062c6e8e
Author: Michael Camilleri <[email protected]>
Date:   Sun,  7 Jun 2026 15:36:41 +0900

Tweak announcement formatting

Diffstat

MCrossmate/Services/AppServices.swift | 2+-
MTests/Unit/Sync/AppServicesAnnouncementTests.swift | 6+++---

2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Crossmate/Services/AppServices.swift b/Crossmate/Services/AppServices.swift

@@ -2866,7 +2866,7 @@ final class AppServices {
             let action = parts.isEmpty ? "made changes" : parts.joined(separator: " and ")
             return "\(name) \(action)"
         }
-        return phrases.joined(separator: "; ")
+        return "\(phrases.joined(separator: "; "))."
     }
 
     /// Parses the silent-push payload into a short, human-readable summary

diff --git a/Tests/Unit/Sync/AppServicesAnnouncementTests.swift b/Tests/Unit/Sync/AppServicesAnnouncementTests.swift

@@ -31,7 +31,7 @@ struct AppServicesAnnouncementTests {
         let body = AppServices.formatSummaryBanner([
             summary(author: "a", playerName: "Alice", added: 4),
         ])
-        #expect(body == "Alice added 4 letters")
+        #expect(body == "Alice added 4 letters.")
     }
 
     @Test("Multi-author summary joins author phrases with '; '")
@@ -40,7 +40,7 @@ struct AppServicesAnnouncementTests {
             summary(author: "a", playerName: "Alice", added: 4),
             summary(author: "b", playerName: "Bob",   added: 1, cleared: 2),
         ])
-        #expect(body == "Alice added 4 letters; Bob added 1 letter and cleared 2 letters")
+        #expect(body == "Alice added 4 letters; Bob added 1 letter and cleared 2 letters.")
     }
 
     @Test("Missing player name falls back to 'A player'")
@@ -48,7 +48,7 @@ struct AppServicesAnnouncementTests {
         let body = AppServices.formatSummaryBanner([
             summary(author: "a", playerName: "", added: 3),
         ])
-        #expect(body == "A player added 3 letters")
+        #expect(body == "A player added 3 letters.")
     }
 }