@cometchat/chat-uikit-react-native 5.5.2 → 5.5.4
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/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/build.gradle +17 -0
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorView.kt +265 -4
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +209 -119
- package/ios/RichTextEditorView.swift +321 -24
- package/ios/SoundPlayer.m +152 -6
- package/package.json +4 -1
- package/react-native-cometchat-ui-kit.podspec +1 -1
- package/src/CometChatCompactMessageComposer/CometChatCompactMessageComposer.tsx +43 -24
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +27 -19
- package/src/CometChatMessageList/CometChatMessageList.tsx +60 -25
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +48 -47
|
@@ -160,56 +160,57 @@ export const LinkPreviewBubble = (props: LinkPreviewBubbleInterface) => {
|
|
|
160
160
|
);
|
|
161
161
|
|
|
162
162
|
return (
|
|
163
|
-
<View
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
163
|
+
<View onLayout={onLayoutHandler}>
|
|
164
|
+
{/* Only the preview card (image, title, description, link) opens the link. Raw touch
|
|
165
|
+
events reach every ancestor of the touched view, whichever child handles the press, so
|
|
166
|
+
these handlers on the outer view also fired for taps on the message text and its
|
|
167
|
+
"Read more" below, and the image container's second copy made an image tap open the
|
|
168
|
+
link twice (ENG-41080). */}
|
|
169
|
+
<View
|
|
170
|
+
onTouchStart={handleTouchStart}
|
|
171
|
+
onTouchEnd={handleTouchEnd}
|
|
172
|
+
onTouchMove={onTouchMove}
|
|
173
|
+
>
|
|
174
|
+
{imageSource ? (
|
|
175
|
+
<View style={style?.headerImageContainerStyle}>
|
|
176
|
+
<Image
|
|
177
|
+
source={imageSource}
|
|
178
|
+
style={[{ height: imageHeight, width: imageWidth }, style?.headerImageStyle]}
|
|
179
|
+
onError={() => {
|
|
180
|
+
setImageSource(DefaultLinkPreview);
|
|
181
|
+
}}
|
|
182
|
+
/>
|
|
183
|
+
</View>
|
|
184
|
+
) : null}
|
|
185
|
+
|
|
186
|
+
<View style={style?.bodyStyle?.containerStyle}>
|
|
187
|
+
<View style={{ flexDirection: "row" }}>
|
|
188
|
+
<View style={style?.bodyStyle?.titleContainerStyle}>
|
|
189
|
+
<Text style={style?.bodyStyle?.titleStyle} ellipsizeMode='tail'>
|
|
190
|
+
{title}
|
|
191
|
+
</Text>
|
|
192
|
+
</View>
|
|
185
193
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
194
|
+
{!imageSource && !faviconError && (
|
|
195
|
+
<View style={style?.bodyStyle?.faviconContainerStyle}>
|
|
196
|
+
<Image
|
|
197
|
+
source={faviconSource}
|
|
198
|
+
style={style?.bodyStyle?.faviconStyle}
|
|
199
|
+
onError={() => {
|
|
200
|
+
setFaviconError(true);
|
|
201
|
+
}}
|
|
202
|
+
/>
|
|
203
|
+
</View>
|
|
204
|
+
)}
|
|
205
|
+
</View>
|
|
206
|
+
<View style={style?.bodyStyle?.subtitleContainerStyle}>
|
|
207
|
+
<Text style={style?.bodyStyle?.subtitleTitle} numberOfLines={2} ellipsizeMode='tail'>
|
|
208
|
+
{description}
|
|
209
|
+
</Text>
|
|
210
|
+
<Text style={style?.bodyStyle?.subtitleTitle} numberOfLines={2} ellipsizeMode='tail'>
|
|
211
|
+
{link}
|
|
191
212
|
</Text>
|
|
192
213
|
</View>
|
|
193
|
-
|
|
194
|
-
{!imageSource && !faviconError && (
|
|
195
|
-
<View style={style?.bodyStyle?.faviconContainerStyle}>
|
|
196
|
-
<Image
|
|
197
|
-
source={faviconSource}
|
|
198
|
-
style={style?.bodyStyle?.faviconStyle}
|
|
199
|
-
onError={(err) => {
|
|
200
|
-
setFaviconError(true);
|
|
201
|
-
}}
|
|
202
|
-
/>
|
|
203
|
-
</View>
|
|
204
|
-
)}
|
|
205
|
-
</View>
|
|
206
|
-
<View style={style?.bodyStyle?.subtitleContainerStyle}>
|
|
207
|
-
<Text style={style?.bodyStyle?.subtitleTitle} numberOfLines={2} ellipsizeMode='tail'>
|
|
208
|
-
{description}
|
|
209
|
-
</Text>
|
|
210
|
-
<Text style={style?.bodyStyle?.subtitleTitle} numberOfLines={2} ellipsizeMode='tail'>
|
|
211
|
-
{link}
|
|
212
|
-
</Text>
|
|
213
214
|
</View>
|
|
214
215
|
</View>
|
|
215
216
|
{/* Only the card that carries the message text gets this padded row; the others would show an empty band. */}
|