@trycourier/courier-react-native 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,7 +101,7 @@ dependencies {
101
101
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
102
102
 
103
103
  // Courier Core SDK
104
- api 'com.github.trycourier:courier-android:2.4.1'
104
+ api 'com.github.trycourier:courier-android:2.5.0'
105
105
  api 'androidx.recyclerview:recyclerview:1.3.2'
106
106
 
107
107
  }
@@ -240,7 +240,7 @@ class CourierReactNativeModule(reactContext: ReactApplicationContext) : ReactCon
240
240
  onMessagesChanged = { messages: List<InboxMessage>, unreadMessageCount: Int, totalMessageCount: Int, canPaginate: Boolean ->
241
241
 
242
242
  val json = Arguments.createMap()
243
- json.putArray("messages", messages.toWritableArray())
243
+ json.putArray("messages", messages.toList().toWritableArray())
244
244
  json.putInt("unreadMessageCount", unreadMessageCount)
245
245
  json.putInt("totalMessageCount", totalMessageCount)
246
246
  json.putBoolean("canPaginate", canPaginate)
@@ -0,0 +1,14 @@
1
+ //
2
+ // CourierAuthenticationListenerWrapper.swift
3
+ // courier-react-native
4
+ //
5
+ // Created by Michael Miller on 2/15/24.
6
+ //
7
+
8
+ import Foundation
9
+ import Courier_iOS
10
+
11
+ internal struct CourierAuthenticationListenerWrapper {
12
+ let authId: String
13
+ let listener: CourierAuthenticationListener
14
+ }
@@ -0,0 +1,24 @@
1
+ //
2
+ // CourierInboxListenerWrapper.swift
3
+ // courier-react-native
4
+ //
5
+ // Created by Michael Miller on 2/15/24.
6
+ //
7
+
8
+ import Foundation
9
+ import Courier_iOS
10
+
11
+ internal struct CourierInboxListenerWrapper {
12
+ let loadingId: String
13
+ let errorId: String
14
+ let messagesId: String
15
+ let listener: CourierInboxListener
16
+ }
17
+
18
+ extension CourierInboxListenerWrapper {
19
+
20
+ internal func getIds() -> [String] {
21
+ return [loadingId, errorId, messagesId]
22
+ }
23
+
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier-react-native",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Inbox & Push Notifications for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",