stream-chat-react-native 8.0.0-beta.2 → 8.0.0-rc.10
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/README.md +1 -1
- package/package.json +3 -3
- package/src/optionalDependencies/shareImage.ts +1 -11
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://www.npmjs.com/package/stream-chat-react-native)
|
|
11
11
|
[](https://github.com/GetStream/stream-chat-react-native/actions)
|
|
12
12
|
[](https://getstream.io/chat/docs/sdk/reactnative)
|
|
13
|
-

|
|
14
14
|
|
|
15
15
|
<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/iphone_chat_art@3x.png?auto=format,enhance" width="50%" />
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native",
|
|
3
3
|
"description": "The official React Native SDK for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "8.0.0-
|
|
4
|
+
"version": "8.0.0-rc.10",
|
|
5
5
|
"homepage": "https://www.npmjs.com/package/stream-chat-react-native",
|
|
6
6
|
"author": {
|
|
7
7
|
"company": "Stream.io Inc",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"es6-symbol": "^3.1.3",
|
|
23
23
|
"mime": "^4.0.7",
|
|
24
|
-
"stream-chat-react-native-core": "8.0.0-
|
|
24
|
+
"stream-chat-react-native-core": "8.0.0-rc.10"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@react-native-camera-roll/camera-roll": ">=7.8.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"postpack": "rm README.md"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"react-native": "0.
|
|
76
|
+
"react-native": "^0.79.3"
|
|
77
77
|
},
|
|
78
78
|
"codegenConfig": {
|
|
79
79
|
"name": "StreamChatReactNativeSpec",
|
|
@@ -8,19 +8,9 @@ try {
|
|
|
8
8
|
console.log('react-native-share is not installed');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
let RNBlobUtil;
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
RNBlobUtil = require('react-native-blob-util').default;
|
|
15
|
-
} catch (e) {
|
|
16
|
-
console.log('react-native-blob-util is not installed');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
11
|
export const shareImage = RNShare
|
|
20
12
|
? async ({ type, url }) => {
|
|
21
13
|
try {
|
|
22
|
-
const base64Image = await RNBlobUtil.fs.readFile(url, 'base64');
|
|
23
|
-
const base64Url = `data:${type};base64,${base64Image}`;
|
|
24
14
|
await RNShare.open({
|
|
25
15
|
activityItemSources:
|
|
26
16
|
Platform.OS === 'ios'
|
|
@@ -45,7 +35,7 @@ export const shareImage = RNShare
|
|
|
45
35
|
excludedActivityTypes: [] as unknown as string,
|
|
46
36
|
failOnCancel: false,
|
|
47
37
|
type,
|
|
48
|
-
url: Platform.OS === 'android' ?
|
|
38
|
+
url: Platform.OS === 'android' ? `file://${url}` : undefined,
|
|
49
39
|
});
|
|
50
40
|
return true;
|
|
51
41
|
} catch (error) {
|