@trycourier/courier-react-native 5.2.0 → 5.2.3
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.
- package/android/src/main/java/com/courierreactnative/CourierSharedModule.kt +3 -3
- package/android/src/main/java/com/courierreactnative/ReactNativeModule.kt +1 -1
- package/android/src/main/java/com/courierreactnative/Utils.kt +1 -1
- package/ios/CourierReactNativeDelegate.m +1 -1
- package/ios/CourierReactNativeEventEmitter.swift +1 -1
- package/lib/typescript/src/views/CourierInboxView.d.ts +1 -1
- package/lib/typescript/src/views/CourierInboxView.d.ts.map +1 -1
- package/lib/typescript/src/views/CourierPreferencesView.d.ts +1 -1
- package/lib/typescript/src/views/CourierPreferencesView.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/views/CourierInboxView.tsx +1 -1
- package/src/views/CourierPreferencesView.tsx +1 -1
|
@@ -266,7 +266,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
|
|
|
266
266
|
},
|
|
267
267
|
onArchiveChanged = { messageSet ->
|
|
268
268
|
reactApplicationContext.sendEvent(
|
|
269
|
-
eventName =
|
|
269
|
+
eventName = archiveId,
|
|
270
270
|
value = messageSet.toJson()
|
|
271
271
|
)
|
|
272
272
|
},
|
|
@@ -297,7 +297,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
|
|
|
297
297
|
json.putInt("index", index)
|
|
298
298
|
json.putString("message", message.toJson())
|
|
299
299
|
reactApplicationContext.sendEvent(
|
|
300
|
-
eventName =
|
|
300
|
+
eventName = messageChangedId,
|
|
301
301
|
value = json
|
|
302
302
|
)
|
|
303
303
|
},
|
|
@@ -307,7 +307,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
|
|
|
307
307
|
json.putInt("index", index)
|
|
308
308
|
json.putString("message", message.toJson())
|
|
309
309
|
reactApplicationContext.sendEvent(
|
|
310
|
-
eventName =
|
|
310
|
+
eventName = messageRemovedId,
|
|
311
311
|
value = json
|
|
312
312
|
)
|
|
313
313
|
},
|
|
@@ -29,7 +29,7 @@ abstract class ReactNativeModule(val tag: String, private val name: String, reac
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
internal fun Promise.apiError(throwable: Throwable) {
|
|
32
|
-
|
|
32
|
+
throwable.message?.let { reject(it, tag, throwable) }
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
}
|
|
@@ -15,7 +15,7 @@ import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
|
15
15
|
import com.google.gson.GsonBuilder
|
|
16
16
|
|
|
17
17
|
internal object Utils {
|
|
18
|
-
val COURIER_AGENT = CourierAgent.ReactNativeAndroid(version = "5.2.
|
|
18
|
+
val COURIER_AGENT = CourierAgent.ReactNativeAndroid(version = "5.2.3")
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
internal fun ReactContext.sendEvent(eventName: String, value: Any?) {
|
|
@@ -22,7 +22,7 @@ NSUInteger notificationPresentationOptions = UNNotificationPresentationOptionNon
|
|
|
22
22
|
if (self) {
|
|
23
23
|
|
|
24
24
|
// Set the user agent
|
|
25
|
-
Courier.agent = [CourierAgent reactNativeIOS:@"5.2.
|
|
25
|
+
Courier.agent = [CourierAgent reactNativeIOS:@"5.2.3"];
|
|
26
26
|
|
|
27
27
|
// Register for remote notifications
|
|
28
28
|
UIApplication *app = [UIApplication sharedApplication];
|
|
@@ -14,7 +14,7 @@ internal class CourierReactNativeEventEmitter: RCTEventEmitter {
|
|
|
14
14
|
|
|
15
15
|
// Set the user agent
|
|
16
16
|
// Used to know the platform performing requests
|
|
17
|
-
Courier.agent = CourierAgent.reactNativeIOS("5.2.
|
|
17
|
+
Courier.agent = CourierAgent.reactNativeIOS("5.2.3")
|
|
18
18
|
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { ViewStyle } from "react-native";
|
|
3
3
|
import { InboxAction } from "../models/InboxAction";
|
|
4
4
|
import { InboxMessage } from "../models/InboxMessage";
|
|
5
|
-
import { CourierInboxTheme } from "
|
|
5
|
+
import { CourierInboxTheme } from "../models/CourierInboxTheme";
|
|
6
6
|
type CourierInboxViewProps = {
|
|
7
7
|
canSwipePages?: boolean;
|
|
8
8
|
theme?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CourierInboxView.d.ts","sourceRoot":"","sources":["../../../../src/views/CourierInboxView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAY,SAAS,EAA2C,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CourierInboxView.d.ts","sourceRoot":"","sources":["../../../../src/views/CourierInboxView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAY,SAAS,EAA2C,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,iBAAiB,CAAC;QAC1B,IAAI,CAAC,EAAE,iBAAiB,CAAA;KACzB,CAAC;IACF,0BAA0B,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,8BAA8B,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChF,mCAAmC,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1G,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,sBA6H5D,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ViewStyle } from "react-native";
|
|
3
|
-
import { CourierPreferencesMode, CourierPreferencesTheme } from "
|
|
3
|
+
import { CourierPreferencesMode, CourierPreferencesTheme } from "../models/CourierPreferencesTheme";
|
|
4
4
|
type CourierPreferencesProps = {
|
|
5
5
|
mode?: CourierPreferencesMode;
|
|
6
6
|
theme?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CourierPreferencesView.d.ts","sourceRoot":"","sources":["../../../../src/views/CourierPreferencesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAqD,SAAS,EAAE,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CourierPreferencesView.d.ts","sourceRoot":"","sources":["../../../../src/views/CourierPreferencesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAqD,SAAS,EAAE,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGpG,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,uBAAuB,CAAC;QAChC,IAAI,CAAC,EAAE,uBAAuB,CAAA;KAC/B,CAAC;IACF,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,sBAAsB,UAAW,uBAAuB,sBAwDpE,CAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useEffect } from "react";
|
|
|
2
2
|
import { Platform, ViewStyle, DeviceEventEmitter, EmitterSubscription } from "react-native";
|
|
3
3
|
import { InboxAction } from "../models/InboxAction";
|
|
4
4
|
import { InboxMessage } from "../models/InboxMessage";
|
|
5
|
-
import { CourierInboxTheme } from "
|
|
5
|
+
import { CourierInboxTheme } from "../models/CourierInboxTheme";
|
|
6
6
|
import { Modules } from "../Modules";
|
|
7
7
|
|
|
8
8
|
type CourierInboxViewProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
2
|
import { DeviceEventEmitter, EmitterSubscription, Platform, ViewStyle } from "react-native";
|
|
3
|
-
import { CourierPreferencesMode, CourierPreferencesTheme } from "
|
|
3
|
+
import { CourierPreferencesMode, CourierPreferencesTheme } from "../models/CourierPreferencesTheme";
|
|
4
4
|
import { Modules } from "../Modules";
|
|
5
5
|
|
|
6
6
|
type CourierPreferencesProps = {
|