-
Notifications
You must be signed in to change notification settings - Fork 315
/
index.js
67 lines (61 loc) · 1.31 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { Platform } from 'react-native';
import { FlatList } from '@stream-io/flat-list-mvcp';
import { registerNativeHandlers } from 'stream-chat-react-native-core';
import {
compressImage,
deleteFile,
getLocalAssetUri,
getPhotos,
iOS14RefreshGallerySelection,
NetInfo,
oniOS14GalleryLibrarySelectionChange,
saveFile,
Sound,
takePhoto,
Video,
} from './handlers';
import {
Audio,
pickDocument,
setClipboardString,
shareImage,
triggerHaptic,
} from './optionalDependencies';
registerNativeHandlers({
Audio,
compressImage,
deleteFile,
FlatList,
getLocalAssetUri,
getPhotos,
iOS14RefreshGallerySelection,
NetInfo,
oniOS14GalleryLibrarySelectionChange,
pickDocument,
saveFile,
SDK: 'stream-chat-react-native',
setClipboardString,
shareImage,
Sound,
takePhoto,
triggerHaptic,
Video,
});
if (Platform.OS === 'android') {
if (typeof Symbol === 'undefined') {
// eslint-disable-next-line no-undef
require('es6-symbol/implement');
if (Array.prototype[Symbol.iterator] === undefined) {
Array.prototype[Symbol.iterator] = function () {
let i = 0;
return {
next: () => ({
done: i >= this.length,
value: this[i++],
}),
};
};
}
}
}
export * from 'stream-chat-react-native-core';