@cometchat/chat-uikit-react-native 4.3.2 → 4.3.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/AndroidManifest.xml +3 -4
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +0 -1
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +125 -7
- package/android/src/main/java/com/reactnativecometchatuikit/ImageManager.java +1 -1
- package/package.json +1 -1
- package/src/CometChatConversations/CometChatConversations.tsx +51 -28
- package/src/CometChatConversations/style.ts +5 -1
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +53 -20
- package/src/CometChatMessageList/CometChatMessageList.tsx +15 -15
- package/src/CometChatMessageList/MessageListConfiguration.ts +5 -5
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +35 -2
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +51 -15
- package/src/index.ts +8 -8
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +1 -4
- package/src/shared/index.ts +8 -8
- package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +1040 -0
- package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +223 -0
- package/src/shared/libs/ImageZoom/helper.ts +144 -0
- package/src/shared/libs/ImageZoom/index.tsx +13 -0
- package/src/shared/libs/ImageZoom/types/index.ts +186 -0
- package/src/shared/libs/VideoPlayer/Video.js +0 -24
- package/src/shared/libs/VideoPlayerControls/assets/img/back.png +0 -0
- package/src/shared/libs/VideoPlayerControls/components/Back/Back.tsx +1 -1
- package/src/shared/utils/NetworkUtils.tsx +5 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +1 -0
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +64 -18
- package/src/shared/views/CometChatImageBubble/assets/index.ts +5 -0
- package/src/shared/views/CometChatImageBubble/assets/spineer.png +0 -0
- package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +106 -0
- package/src/shared/views/CometChatImageViewerModal/index.tsx +1 -0
- package/src/shared/views/CometChatImageViewerModal/resources/Back.png +0 -0
- package/src/shared/views/CometChatImageViewerModal/resources/index.ts +5 -0
- package/src/shared/views/CometChatList/CometChatList.tsx +10 -1
- package/src/shared/views/{CometChatReactionsList/CometChatReactionsList.tsx → CometChatReactionList/CometChatReactionList.tsx} +17 -17
- package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +14 -0
- package/src/shared/views/CometChatReactionList/index.ts +12 -0
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +1 -1
- package/src/shared/views/index.ts +5 -5
- package/android/src/main/java/com/reactnativecometchatuikit/VideoManager.java +0 -40
- package/src/shared/libs/VideoPlayerControls/assets/img/back@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/back@3x.png +0 -0
- package/src/shared/views/CometChatReactionsList/ReactionsListConfiguration.tsx +0 -14
- package/src/shared/views/CometChatReactionsList/index.ts +0 -12
- /package/src/shared/views/{CometChatReactionsList/ReactionsListStyle.tsx → CometChatReactionList/ReactionListStyle.tsx} +0 -0
- /package/src/shared/views/{CometChatReactionsList → CometChatReactionList}/resources/Spineer.png +0 -0
- /package/src/shared/views/{CometChatReactionsList → CometChatReactionList}/resources/index.ts +0 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
1
|
+
import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
2
|
import { View, Image, NativeModules, Platform, NativeEventEmitter, EmitterSubscription } from "react-native";
|
|
3
3
|
import { ImageType } from "../../base";
|
|
4
4
|
import { ImageBubbleStyle, ImageBubbleStyleInterface } from "./ImageBubbleStyle";
|
|
5
|
+
import { ImageViewerModal } from "../CometChatImageViewerModal";
|
|
6
|
+
import { ICONS } from "./assets";
|
|
7
|
+
import { isHttpUrl } from "../../utils/NetworkUtils";
|
|
5
8
|
|
|
6
9
|
const { FileManager, ImageManager } = NativeModules;
|
|
7
10
|
const eventEmitter = new NativeEventEmitter(FileManager);
|
|
@@ -49,6 +52,8 @@ export const CometChatImageBubble = (props: CometChatImageBubbleInterface) => {
|
|
|
49
52
|
|
|
50
53
|
const _style = new ImageBubbleStyle(style || {});
|
|
51
54
|
const [isOpening, setOpening] = useState(false);
|
|
55
|
+
const [downloaded, setDownloaded] = useState(false);
|
|
56
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
52
57
|
const url = useRef("");
|
|
53
58
|
|
|
54
59
|
const {
|
|
@@ -107,7 +112,7 @@ export const CometChatImageBubble = (props: CometChatImageBubbleInterface) => {
|
|
|
107
112
|
const endTime = Date.now();
|
|
108
113
|
const pressDuration = endTime - pressTime.current;
|
|
109
114
|
if (pressDuration < 500) {
|
|
110
|
-
|
|
115
|
+
setIsVisible(true)
|
|
111
116
|
}
|
|
112
117
|
};
|
|
113
118
|
|
|
@@ -115,23 +120,64 @@ export const CometChatImageBubble = (props: CometChatImageBubbleInterface) => {
|
|
|
115
120
|
// pressTime.current = null
|
|
116
121
|
// }
|
|
117
122
|
|
|
123
|
+
useLayoutEffect(() => {
|
|
124
|
+
if(isHttpUrl(thumbnailUrl?.uri ?? imageUrl?.uri)) {
|
|
125
|
+
Image.prefetch(thumbnailUrl?.uri ?? imageUrl?.uri).then((res) => {
|
|
126
|
+
setDownloaded(res);
|
|
127
|
+
});
|
|
128
|
+
} else {
|
|
129
|
+
setDownloaded(true);
|
|
130
|
+
}
|
|
131
|
+
}, []);
|
|
132
|
+
|
|
118
133
|
return (
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
<>
|
|
135
|
+
{
|
|
136
|
+
isVisible &&
|
|
137
|
+
<ImageViewerModal imageUrl={imageUrl} isVisible={isVisible} onClose={()=>{
|
|
138
|
+
setIsVisible(false)
|
|
139
|
+
}}/>
|
|
140
|
+
}
|
|
141
|
+
<View
|
|
142
|
+
onTouchStart={handleTouchStart}
|
|
143
|
+
onTouchEnd={handleTouchEnd}
|
|
144
|
+
// onTouchMove={onTouchMove}
|
|
145
|
+
style={{
|
|
146
|
+
justifyContent:'center',
|
|
147
|
+
alignItems: 'center',
|
|
148
|
+
height,
|
|
149
|
+
width
|
|
133
150
|
}}
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
>
|
|
152
|
+
{
|
|
153
|
+
!downloaded
|
|
154
|
+
? <View>
|
|
155
|
+
<Image
|
|
156
|
+
resizeMode={"contain"}
|
|
157
|
+
source={ICONS.Spinner}
|
|
158
|
+
style={{
|
|
159
|
+
height: 20,
|
|
160
|
+
width: 20,
|
|
161
|
+
backgroundColor,
|
|
162
|
+
}}
|
|
163
|
+
/>
|
|
164
|
+
</View>
|
|
165
|
+
: <Image
|
|
166
|
+
resizeMode={resizeMode || "cover"}
|
|
167
|
+
loadingIndicatorSource={ICONS.Spinner}
|
|
168
|
+
source={thumbnailUrl ?? imageUrl}
|
|
169
|
+
style={{
|
|
170
|
+
height,
|
|
171
|
+
width,
|
|
172
|
+
aspectRatio,
|
|
173
|
+
backgroundColor,
|
|
174
|
+
borderRadius,
|
|
175
|
+
...border
|
|
176
|
+
}}
|
|
177
|
+
/>
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
</View>
|
|
181
|
+
</>
|
|
136
182
|
)
|
|
137
183
|
}
|
|
Binary file
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React, { useLayoutEffect, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Modal,
|
|
4
|
+
View,
|
|
5
|
+
Image,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
SafeAreaView,
|
|
9
|
+
ActivityIndicator,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { ICONS } from './resources';
|
|
12
|
+
import { ReactNativeZoomableViewWithGestures } from '../../libs/ImageZoom';
|
|
13
|
+
|
|
14
|
+
export const ImageViewerModal = ({ imageUrl, isVisible, onClose }) => {
|
|
15
|
+
|
|
16
|
+
const [downloaded, setDownloaded] = useState(false);
|
|
17
|
+
useLayoutEffect(() => {
|
|
18
|
+
Image.prefetch(imageUrl.uri).then((res) => {
|
|
19
|
+
setDownloaded(res);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Image.getSize(
|
|
23
|
+
imageUrl.uri,
|
|
24
|
+
(res) => {
|
|
25
|
+
console.log('success : ', res);
|
|
26
|
+
},
|
|
27
|
+
(res) => {
|
|
28
|
+
console.log('error : ', res);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Modal
|
|
35
|
+
animationType="slide"
|
|
36
|
+
transparent={false}
|
|
37
|
+
visible={isVisible}
|
|
38
|
+
onRequestClose={onClose}
|
|
39
|
+
>
|
|
40
|
+
<SafeAreaView style={styles.centeredView}>
|
|
41
|
+
<View style={styles.container}>
|
|
42
|
+
<View style={styles.header}>
|
|
43
|
+
<TouchableOpacity style={styles.closeButton} onPress={onClose}>
|
|
44
|
+
<Image
|
|
45
|
+
source={ICONS.backIcon}
|
|
46
|
+
style={{ tintColor: '#fff', height: 20, width: 20 }}
|
|
47
|
+
/>
|
|
48
|
+
</TouchableOpacity>
|
|
49
|
+
</View>
|
|
50
|
+
{downloaded ? (
|
|
51
|
+
<View style={styles.imageContainer}>
|
|
52
|
+
<ReactNativeZoomableViewWithGestures onSwipeDown={onClose}>
|
|
53
|
+
<Image
|
|
54
|
+
source={imageUrl}
|
|
55
|
+
style={styles.imageStyle}
|
|
56
|
+
resizeMode="contain"
|
|
57
|
+
/>
|
|
58
|
+
</ReactNativeZoomableViewWithGestures>
|
|
59
|
+
</View>
|
|
60
|
+
) : (
|
|
61
|
+
<ActivityIndicator color={'#fff'} />
|
|
62
|
+
)}
|
|
63
|
+
</View>
|
|
64
|
+
</SafeAreaView>
|
|
65
|
+
</Modal>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const styles = StyleSheet.create({
|
|
70
|
+
centeredView: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
zIndex: 1,
|
|
73
|
+
elevation: 1,
|
|
74
|
+
},
|
|
75
|
+
container: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
justifyContent: 'center',
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
backgroundColor: '#000',
|
|
80
|
+
},
|
|
81
|
+
header: {
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
top: 0,
|
|
84
|
+
backgroundColor: 'transparent',
|
|
85
|
+
justifyContent: 'flex-start',
|
|
86
|
+
width: '100%',
|
|
87
|
+
zIndex: 100,
|
|
88
|
+
},
|
|
89
|
+
imageContainer: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
height: '100%',
|
|
92
|
+
width: '100%',
|
|
93
|
+
},
|
|
94
|
+
imageStyle: {
|
|
95
|
+
width: '100%',
|
|
96
|
+
height: '100%',
|
|
97
|
+
},
|
|
98
|
+
closeButton: {
|
|
99
|
+
zIndex: 10,
|
|
100
|
+
height: 60,
|
|
101
|
+
width: 60,
|
|
102
|
+
justifyContent: 'center',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
elevation: 10,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ImageViewerModal } from './ImageViewerModal';
|
|
Binary file
|
|
@@ -42,6 +42,7 @@ export interface CometChatListActionsInterface {
|
|
|
42
42
|
removeItemFromList: (itemId: string | number) => void;
|
|
43
43
|
getListItem: (itemId: string | number) => void;
|
|
44
44
|
getSelectedItems: () => Array<any>,
|
|
45
|
+
getAllListItems: () => Array<any>,
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export interface CometChatListStylesInterface {
|
|
@@ -176,6 +177,7 @@ export const CometChatList = React.forwardRef<
|
|
|
176
177
|
getListItem,
|
|
177
178
|
updateAndMoveToFirst,
|
|
178
179
|
getSelectedItems,
|
|
180
|
+
getAllListItems,
|
|
179
181
|
};
|
|
180
182
|
});
|
|
181
183
|
|
|
@@ -316,7 +318,7 @@ export const CometChatList = React.forwardRef<
|
|
|
316
318
|
|
|
317
319
|
/**
|
|
318
320
|
* This will move item to first location if item doesn't exits then add it to first location.
|
|
319
|
-
* @param item
|
|
321
|
+
* @param item
|
|
320
322
|
*/
|
|
321
323
|
const updateAndMoveToFirst = (item: any) => {
|
|
322
324
|
let newList = [...list];
|
|
@@ -360,6 +362,13 @@ export const CometChatList = React.forwardRef<
|
|
|
360
362
|
return list.find((item: any) => item[listItemKey] == itemId);
|
|
361
363
|
};
|
|
362
364
|
|
|
365
|
+
/**
|
|
366
|
+
* get all list items
|
|
367
|
+
*/
|
|
368
|
+
const getAllListItems = (): any => {
|
|
369
|
+
return list;
|
|
370
|
+
};
|
|
371
|
+
|
|
363
372
|
/**
|
|
364
373
|
* update list
|
|
365
374
|
* @param {boolean} thrughKeyword - pass true if wants to set only new users.
|
|
@@ -6,17 +6,17 @@ import { CometChatListItem, ListItemStyleInterface } from '../CometChatListItem'
|
|
|
6
6
|
import { CometChatContext } from '../../CometChatContext';
|
|
7
7
|
import { CometChatUIEventHandler, MessageEvents } from '../../events';
|
|
8
8
|
import { messageStatus } from '../../utils/CometChatMessageHelper';
|
|
9
|
-
import { ReactionListStyle, ReactionListStyleInterface } from './
|
|
9
|
+
import { ReactionListStyle, ReactionListStyleInterface } from './ReactionListStyle';
|
|
10
10
|
import { localize } from '../../resources';
|
|
11
11
|
import { ImageType } from '../../base';
|
|
12
12
|
import { LoadingIcon } from './resources';
|
|
13
13
|
import { CommonUtils } from '../../utils/CommonUtils';
|
|
14
14
|
|
|
15
|
-
export interface
|
|
15
|
+
export interface CometChatReactionListInterface {
|
|
16
16
|
messageObject: CometChat.BaseMessage;
|
|
17
17
|
onPress?: (messageReaction: CometChat.Reaction, messageObject: CometChat.BaseMessage) => void;
|
|
18
18
|
reactionRequestBuilder?: CometChat.ReactionsRequestBuilder;
|
|
19
|
-
|
|
19
|
+
reactionListStyle?: ReactionListStyleInterface;
|
|
20
20
|
avatarStyle?: AvatarStyleInterface;
|
|
21
21
|
listItemStyle?: ListItemStyleInterface;
|
|
22
22
|
selectedReaction?: string;
|
|
@@ -26,11 +26,11 @@ export interface CometChatReactionsListInterface {
|
|
|
26
26
|
LoadingStateView?: () => JSX.Element;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export const
|
|
29
|
+
export const CometChatReactionList = (props: CometChatReactionListInterface) => {
|
|
30
30
|
|
|
31
31
|
const {
|
|
32
32
|
messageObject, onPress, reactionRequestBuilder, avatarStyle,
|
|
33
|
-
listItemStyle, selectedReaction,
|
|
33
|
+
listItemStyle, selectedReaction, reactionListStyle,
|
|
34
34
|
ErrorStateView,
|
|
35
35
|
errorStateText,
|
|
36
36
|
loadingIconURL,
|
|
@@ -50,18 +50,18 @@ export const CometChatReactionsList = (props: CometChatReactionsListInterface) =
|
|
|
50
50
|
let reactionListMap: Record<string, CometChat.Reaction[]> = useRef({});
|
|
51
51
|
|
|
52
52
|
const _style = new ReactionListStyle({
|
|
53
|
-
subtitleColor:
|
|
54
|
-
subtitleFont:
|
|
55
|
-
activeEmojiBackgroundColor:
|
|
56
|
-
sliderEmojiCountColor:
|
|
57
|
-
tailViewFont:
|
|
58
|
-
sliderEmojiCountFont:
|
|
59
|
-
sliderEmojiFont:
|
|
60
|
-
errorTextColor:
|
|
61
|
-
errorTextFont:
|
|
62
|
-
loadingTint:
|
|
63
|
-
separatorColor:
|
|
64
|
-
...
|
|
53
|
+
subtitleColor: reactionListStyle?.subtitleColor || theme.palette.getAccent600(),
|
|
54
|
+
subtitleFont: reactionListStyle?.subtitleFont || theme.typography.subtitle2,
|
|
55
|
+
activeEmojiBackgroundColor: reactionListStyle?.activeEmojiBackgroundColor || theme.palette.getAccent100(),
|
|
56
|
+
sliderEmojiCountColor: reactionListStyle?.sliderEmojiCountColor || theme.palette.getAccent700(),
|
|
57
|
+
tailViewFont: reactionListStyle?.tailViewFont || theme.typography.title1,
|
|
58
|
+
sliderEmojiCountFont: reactionListStyle?.sliderEmojiCountFont || theme.typography.subtitle1,
|
|
59
|
+
sliderEmojiFont: reactionListStyle?.sliderEmojiFont || theme.typography.subtitle1,
|
|
60
|
+
errorTextColor: reactionListStyle?.errorTextColor || theme?.palette?.getError(),
|
|
61
|
+
errorTextFont: reactionListStyle?.errorTextFont || theme?.typography?.subtitle1,
|
|
62
|
+
loadingTint: reactionListStyle?.loadingTint || theme?.palette.getAccent700(),
|
|
63
|
+
separatorColor: reactionListStyle?.separatorColor || theme.palette.getAccent100(),
|
|
64
|
+
...reactionListStyle,
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
const {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CometChatReactionListInterface } from './CometChatReactionList';
|
|
2
|
+
|
|
3
|
+
export interface ReactionListConfigurationInterface extends Omit<CometChatReactionListInterface,
|
|
4
|
+
'messageObject' | 'errorStateText'
|
|
5
|
+
> { }
|
|
6
|
+
|
|
7
|
+
export class ReactionListConfiguration {
|
|
8
|
+
constructor(props: ReactionListConfigurationInterface) {
|
|
9
|
+
if (props)
|
|
10
|
+
for (const [key, value] of Object.entries(props)) {
|
|
11
|
+
this[key] = value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CometChatReactionList, CometChatReactionListInterface } from './CometChatReactionList';
|
|
2
|
+
import { ReactionListStyle, ReactionListStyleInterface } from './ReactionListStyle';
|
|
3
|
+
import { ReactionListConfiguration, ReactionListConfigurationInterface } from './ReactionListConfiguration';
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
CometChatReactionList,
|
|
7
|
+
CometChatReactionListInterface,
|
|
8
|
+
ReactionListStyle,
|
|
9
|
+
ReactionListStyleInterface,
|
|
10
|
+
ReactionListConfiguration,
|
|
11
|
+
ReactionListConfigurationInterface
|
|
12
|
+
}
|
|
@@ -8,7 +8,7 @@ import { Style } from "./style";
|
|
|
8
8
|
import { CometChatContextType } from "../../base/Types";
|
|
9
9
|
import { CometChatVideoPlayer } from "../CometChatVideoPlayer";
|
|
10
10
|
|
|
11
|
-
const {
|
|
11
|
+
const { FileManager } = NativeModules;
|
|
12
12
|
const eventEmitter = new NativeEventEmitter(FileManager);
|
|
13
13
|
let statusListener: EmitterSubscription;
|
|
14
14
|
export interface CometChatVideoBubbleInterface {
|
|
@@ -89,7 +89,7 @@ import { CometChatCardBubble, CometChatCardBubbleInterface } from './CometChatCa
|
|
|
89
89
|
import { CometChatSchedulerBubble, CometChatSchedulerBubbleInterface } from './CometChatSchedulerBubble'
|
|
90
90
|
|
|
91
91
|
import { CometChatReactions, CometChatReactionsInterface, ReactionsConfiguration, ReactionsConfigurationInterface, ReactionsStyle, ReactionsStyleInterface } from './CometChatReactions';
|
|
92
|
-
import {
|
|
92
|
+
import { CometChatReactionList, CometChatReactionListInterface, ReactionListStyle, ReactionListStyleInterface, ReactionListConfiguration, ReactionListConfigurationInterface } from './CometChatReactionList';
|
|
93
93
|
import { CometChatQuickReactions, CometChatQuickReactionsInterface, QuickReactionsConfiguration, QuickReactionsConfigurationInterface, QuickReactionsStyle, QuickReactionsStyleInterface } from './CometChatQuickReactions';
|
|
94
94
|
|
|
95
95
|
import { CometChatEmojiKeyboard, EmojiKeyboardConfiguration, EmojiKeyboardStyle } from './CometChatEmojiKeyboard';
|
|
@@ -180,12 +180,12 @@ export {
|
|
|
180
180
|
ReactionsConfigurationInterface,
|
|
181
181
|
ReactionsStyle,
|
|
182
182
|
ReactionsStyleInterface,
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
CometChatReactionList,
|
|
184
|
+
CometChatReactionListInterface,
|
|
185
185
|
ReactionListStyle,
|
|
186
186
|
ReactionListStyleInterface,
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
ReactionListConfiguration,
|
|
188
|
+
ReactionListConfigurationInterface,
|
|
189
189
|
CometChatQuickReactions,
|
|
190
190
|
CometChatQuickReactionsInterface,
|
|
191
191
|
QuickReactionsConfiguration,
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
package com.reactnativecometchatuikit;
|
|
2
|
-
|
|
3
|
-
import android.content.Intent;
|
|
4
|
-
import android.util.Log;
|
|
5
|
-
|
|
6
|
-
import androidx.annotation.NonNull;
|
|
7
|
-
|
|
8
|
-
import com.facebook.react.bridge.Callback;
|
|
9
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
10
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
11
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
12
|
-
|
|
13
|
-
public class VideoManager extends ReactContextBaseJavaModule {
|
|
14
|
-
public static final String TAG = "VideoManager";
|
|
15
|
-
|
|
16
|
-
VideoManager(ReactApplicationContext context) {
|
|
17
|
-
super(context);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@ReactMethod
|
|
21
|
-
public void openVideo(String url, Callback callback) {
|
|
22
|
-
try {
|
|
23
|
-
Intent i = new Intent(getReactApplicationContext(), CometChatVideoPlayer.class);
|
|
24
|
-
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
25
|
-
i.putExtra("videoUrl", url);
|
|
26
|
-
getReactApplicationContext().startActivity(i);
|
|
27
|
-
} catch (Exception ex) {
|
|
28
|
-
Log.e(TAG, "openVideo: " + ex.getMessage());
|
|
29
|
-
callback.invoke("error:" + ex.getMessage());
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
callback.invoke("success");
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@NonNull
|
|
36
|
-
@Override
|
|
37
|
-
public String getName() {
|
|
38
|
-
return "VideoManager";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CometChatReactionsListInterface } from './CometChatReactionsList';
|
|
2
|
-
|
|
3
|
-
export interface ReactionsListConfigurationInterface extends Omit<CometChatReactionsListInterface,
|
|
4
|
-
'messageObject' | 'errorStateText'
|
|
5
|
-
> { }
|
|
6
|
-
|
|
7
|
-
export class ReactionsListConfiguration {
|
|
8
|
-
constructor(props: ReactionsListConfigurationInterface) {
|
|
9
|
-
if (props)
|
|
10
|
-
for (const [key, value] of Object.entries(props)) {
|
|
11
|
-
this[key] = value;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CometChatReactionsList, CometChatReactionsListInterface } from './CometChatReactionsList';
|
|
2
|
-
import { ReactionListStyle, ReactionListStyleInterface } from './ReactionsListStyle';
|
|
3
|
-
import { ReactionsListConfiguration, ReactionsListConfigurationInterface } from './ReactionsListConfiguration';
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
CometChatReactionsList,
|
|
7
|
-
CometChatReactionsListInterface,
|
|
8
|
-
ReactionListStyle,
|
|
9
|
-
ReactionListStyleInterface,
|
|
10
|
-
ReactionsListConfiguration,
|
|
11
|
-
ReactionsListConfigurationInterface
|
|
12
|
-
}
|
|
File without changes
|
/package/src/shared/views/{CometChatReactionsList → CometChatReactionList}/resources/Spineer.png
RENAMED
|
File without changes
|
/package/src/shared/views/{CometChatReactionsList → CometChatReactionList}/resources/index.ts
RENAMED
|
File without changes
|