mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
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.
This commit is contained in:
@@ -30,7 +30,7 @@ struct HealthChatCompoundHook: CompoundHookProtocol {
|
|||||||
\.borderInteractivePrimary,
|
\.borderInteractivePrimary,
|
||||||
\.textBadgeAccent
|
\.textBadgeAccent
|
||||||
]
|
]
|
||||||
let solidUIColorTokens: [KeyPath<CompoundUIColorTokens, UIColor>] = [
|
let solidUIColorTokens: [KeyPath<CompoundUIColorTokens, UIColor> & Sendable] = [
|
||||||
\.bgActionPrimaryRest,
|
\.bgActionPrimaryRest,
|
||||||
\.bgAccentRest,
|
\.bgAccentRest,
|
||||||
\.iconAccentPrimary,
|
\.iconAccentPrimary,
|
||||||
@@ -69,7 +69,7 @@ struct HealthChatCompoundHook: CompoundHookProtocol {
|
|||||||
\.bgBadgeAccent,
|
\.bgBadgeAccent,
|
||||||
\.borderAccentSubtle
|
\.borderAccentSubtle
|
||||||
]
|
]
|
||||||
let tintUIColorTokens: [KeyPath<CompoundUIColorTokens, UIColor>] = [
|
let tintUIColorTokens: [KeyPath<CompoundUIColorTokens, UIColor> & Sendable] = [
|
||||||
\.bgAccentSelected,
|
\.bgAccentSelected,
|
||||||
\.bgBadgeAccent,
|
\.bgBadgeAccent,
|
||||||
\.borderAccentSubtle
|
\.borderAccentSubtle
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ nonisolated struct NotificationContentBuilderTests {
|
|||||||
var mediaProvider: MediaProviderMock
|
var mediaProvider: MediaProviderMock
|
||||||
var notificationContent: UNMutableNotificationContent
|
var notificationContent: UNMutableNotificationContent
|
||||||
|
|
||||||
init() {
|
init() async {
|
||||||
notificationContent = .init()
|
notificationContent = .init()
|
||||||
let stringBuilder = RoomMessageEventStringBuilder(attributedStringBuilder: AttributedStringBuilder(mentionBuilder: PlainMentionBuilder()),
|
let stringBuilder = RoomMessageEventStringBuilder(attributedStringBuilder: AttributedStringBuilder(mentionBuilder: PlainMentionBuilder()),
|
||||||
style: .plain)
|
style: .plain)
|
||||||
mediaProvider = MediaProviderMock(.init())
|
mediaProvider = MediaProviderMock(.init())
|
||||||
notificationContentBuilder = NotificationContentBuilder(messageEventStringBuilder: stringBuilder,
|
notificationContentBuilder = await NotificationContentBuilder(messageEventStringBuilder: stringBuilder,
|
||||||
notificationSoundName: UNNotificationSoundName("message.caf"),
|
notificationSoundName: UNNotificationSoundName("message.caf"),
|
||||||
userSession: NSEUserSessionMock(.init()))
|
userSession: NSEUserSessionMock(.init()))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user