stream-chat-react-native 5.21.0-beta.1 → 5.21.0-beta.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/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": "5.21.0-beta.
|
|
4
|
+
"version": "5.21.0-beta.3",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"types": "types/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"es6-symbol": "^3.1.3",
|
|
14
|
-
"stream-chat-react-native-core": "5.21.0-beta.
|
|
14
|
+
"stream-chat-react-native-core": "5.21.0-beta.3"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@react-native-camera-roll/camera-roll": ">=5.0.0",
|
|
@@ -7,6 +7,7 @@ type ReturnType = {
|
|
|
7
7
|
assets: Array<Omit<Asset, 'source'> & { source: 'picker' }>;
|
|
8
8
|
endCursor: string | undefined;
|
|
9
9
|
hasNextPage: boolean;
|
|
10
|
+
iOSLimited: boolean;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const verifyAndroidPermissions = async () => {
|
|
@@ -84,7 +85,7 @@ export const getPhotos = async ({
|
|
|
84
85
|
}));
|
|
85
86
|
const hasNextPage = results.page_info.has_next_page;
|
|
86
87
|
const endCursor = results.page_info.end_cursor;
|
|
87
|
-
return { assets, endCursor, hasNextPage };
|
|
88
|
+
return { assets, endCursor, hasNextPage, iOSLimited: !!results.limited };
|
|
88
89
|
} catch (_error) {
|
|
89
90
|
throw new Error('getPhotos Error');
|
|
90
91
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { iosRefreshGallerySelection } from '@react-native-camera-roll/camera-roll';
|
|
4
|
+
|
|
5
|
+
const isAboveIOS14 = Platform.OS === 'ios' && parseInt(Platform.Version as string, 10) >= 14;
|
|
6
|
+
|
|
7
|
+
export const iOS14RefreshGallerySelection = (): Promise<void> => {
|
|
8
|
+
if (isAboveIOS14) {
|
|
9
|
+
return iosRefreshGallerySelection().then(() => {
|
|
10
|
+
//do nothing
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return Promise.resolve();
|
|
14
|
+
};
|
package/src/handlers/index.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
deleteFile,
|
|
9
9
|
getLocalAssetUri,
|
|
10
10
|
getPhotos,
|
|
11
|
+
iOS14RefreshGallerySelection,
|
|
11
12
|
NetInfo,
|
|
12
13
|
oniOS14GalleryLibrarySelectionChange,
|
|
13
14
|
saveFile,
|
|
@@ -29,6 +30,7 @@ registerNativeHandlers({
|
|
|
29
30
|
FlatList,
|
|
30
31
|
getLocalAssetUri,
|
|
31
32
|
getPhotos,
|
|
33
|
+
iOS14RefreshGallerySelection,
|
|
32
34
|
NetInfo,
|
|
33
35
|
oniOS14GalleryLibrarySelectionChange,
|
|
34
36
|
pickDocument,
|