From 65cc9ef940775ae1a3d4a25336d87d75e421b366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl?= Date: Tue, 22 Sep 2026 18:46:09 +0200 Subject: [PATCH] Build the fork with Xcode 27 Xcode 27 ships Swift 6.4, which rejects two things 26.09.1 still contains. The upstream fix for the app itself is cherry-picked as the commit before this one; these two are what it does not cover. Compound's colour overrides now take a KeyPath & Sendable, so the HealthChat brand arrays have to carry the same constraint. NotificationContentBuilder is main-actor isolated, so its test suite has to build the type from an async init. The lines match upstream's own fix, which only exists inside the larger AccountProvider change (#6103) and so cannot be cherry-picked on its own. --- .../AppHooks/HealthChat/HealthChatCompoundHook.swift | 4 ++-- UnitTests/Sources/NotificationContentBuilderTests.swift | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ElementX/Sources/AppHooks/HealthChat/HealthChatCompoundHook.swift b/ElementX/Sources/AppHooks/HealthChat/HealthChatCompoundHook.swift index fac80258e..154eda0fc 100644 --- a/ElementX/Sources/AppHooks/HealthChat/HealthChatCompoundHook.swift +++ b/ElementX/Sources/AppHooks/HealthChat/HealthChatCompoundHook.swift @@ -30,7 +30,7 @@ struct HealthChatCompoundHook: CompoundHookProtocol { \.borderInteractivePrimary, \.textBadgeAccent ] - let solidUIColorTokens: [KeyPath] = [ + let solidUIColorTokens: [KeyPath & Sendable] = [ \.bgActionPrimaryRest, \.bgAccentRest, \.iconAccentPrimary, @@ -69,7 +69,7 @@ struct HealthChatCompoundHook: CompoundHookProtocol { \.bgBadgeAccent, \.borderAccentSubtle ] - let tintUIColorTokens: [KeyPath] = [ + let tintUIColorTokens: [KeyPath & Sendable] = [ \.bgAccentSelected, \.bgBadgeAccent, \.borderAccentSubtle diff --git a/UnitTests/Sources/NotificationContentBuilderTests.swift b/UnitTests/Sources/NotificationContentBuilderTests.swift index ce861fdb2..d7278a459 100644 --- a/UnitTests/Sources/NotificationContentBuilderTests.swift +++ b/UnitTests/Sources/NotificationContentBuilderTests.swift @@ -17,14 +17,14 @@ nonisolated struct NotificationContentBuilderTests { var mediaProvider: MediaProviderMock var notificationContent: UNMutableNotificationContent - init() { + init() async { notificationContent = .init() let stringBuilder = RoomMessageEventStringBuilder(attributedStringBuilder: AttributedStringBuilder(mentionBuilder: PlainMentionBuilder()), style: .plain) mediaProvider = MediaProviderMock(.init()) - notificationContentBuilder = NotificationContentBuilder(messageEventStringBuilder: stringBuilder, - notificationSoundName: UNNotificationSoundName("message.caf"), - userSession: NSEUserSessionMock(.init())) + notificationContentBuilder = await NotificationContentBuilder(messageEventStringBuilder: stringBuilder, + notificationSoundName: UNNotificationSoundName("message.caf"), + userSession: NSEUserSessionMock(.init())) } @Test