Skip to content

Commit b6126d0

Browse files
committed
Fix weird archiving issue, add another rgb pattern
1 parent bcf5ffc commit b6126d0

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

packages/react-native-activity-kit/ios/ActivityKitCore.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ public extension DictionaryAccessible {
115115
}
116116
}
117117

118+
if let rgbColor = value as? RGBColor {
119+
if let alpha = rgbColor.alpha {
120+
return Color(
121+
red: rgbColor.red * 255,
122+
green: rgbColor.green * 255,
123+
blue: rgbColor.blue * 255,
124+
opacity: alpha
125+
)
126+
}
127+
return Color(
128+
red: rgbColor.red * 255,
129+
green: rgbColor.green * 255,
130+
blue: rgbColor.blue * 255
131+
)
132+
}
133+
118134
return nil
119135
}
120136
}

packages/react-native-activity-kit/ios/AlarmKitModule.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class AlarmKitModule: HybridAlarmKitModuleSpec {
148148
return scheduleAlarm(alarmConfiguration: alarmConfiguration)
149149
}
150150

151-
func createAlarm(props: AlarmProps) throws -> NitroModules.Promise<any HybridAlarmProxySpec> {
151+
func createAlarm(props: AlarmProps) throws -> Promise<any HybridAlarmProxySpec> {
152152
let alertContent = createAlertPresentation(props.alert)
153153

154154
let pausedPresentation = createPausedPresentation(props.paused)
@@ -175,7 +175,7 @@ class AlarmKitModule: HybridAlarmKitModuleSpec {
175175
return scheduleAlarm(alarmConfiguration: alarmConfiguration)
176176
}
177177

178-
func requestAuthorization() throws -> NitroModules.Promise<AuthStatus> {
178+
func requestAuthorization() throws -> Promise<AuthStatus> {
179179
return Promise.async {
180180
try await withCheckedThrowingContinuation { continuation in
181181
Task {

0 commit comments

Comments
 (0)