react-native-gifted-chat 3.1.0 → 3.1.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
package/src/Bubble/index.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import { MessageVideo } from '../MessageVideo'
|
|
|
13
13
|
import { IMessage } from '../Models'
|
|
14
14
|
import { QuickReplies } from '../QuickReplies'
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import { getStyleWithPosition } from '../styles'
|
|
17
17
|
import { Time } from '../Time'
|
|
18
18
|
|
|
19
19
|
import { isSameUser, isSameDay, renderComponentOrElement } from '../utils'
|
|
@@ -237,19 +237,19 @@ export const Bubble = <TMessage extends IMessage = IMessage>(props: BubbleProps<
|
|
|
237
237
|
(currentMessage.sent || currentMessage.received || currentMessage.pending)
|
|
238
238
|
)
|
|
239
239
|
return (
|
|
240
|
-
<View style={styles.
|
|
240
|
+
<View style={styles.messageStatusContainer}>
|
|
241
241
|
{!!currentMessage.sent && (
|
|
242
|
-
<Text style={[styles.
|
|
242
|
+
<Text style={[styles.messageStatus, props.tickStyle]}>
|
|
243
243
|
{'✓'}
|
|
244
244
|
</Text>
|
|
245
245
|
)}
|
|
246
246
|
{!!currentMessage.received && (
|
|
247
|
-
<Text style={[styles.
|
|
247
|
+
<Text style={[styles.messageStatus, props.tickStyle]}>
|
|
248
248
|
{'✓'}
|
|
249
249
|
</Text>
|
|
250
250
|
)}
|
|
251
251
|
{!!currentMessage.pending && (
|
|
252
|
-
<Text style={[styles.
|
|
252
|
+
<Text style={[styles.messageStatus, props.tickStyle]}>
|
|
253
253
|
{'🕓'}
|
|
254
254
|
</Text>
|
|
255
255
|
)}
|
|
@@ -362,7 +362,7 @@ export const Bubble = <TMessage extends IMessage = IMessage>(props: BubbleProps<
|
|
|
362
362
|
]}
|
|
363
363
|
>
|
|
364
364
|
{renderUsername()}
|
|
365
|
-
<View style={
|
|
365
|
+
<View style={styles.messageTimeAndStatusContainer}>
|
|
366
366
|
{renderTime()}
|
|
367
367
|
{renderTicks()}
|
|
368
368
|
</View>
|
package/src/Bubble/styles.ts
CHANGED
|
@@ -37,14 +37,21 @@ const styles = StyleSheet.create({
|
|
|
37
37
|
borderTopRightRadius: 3,
|
|
38
38
|
},
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
messageTimeAndStatusContainer: {
|
|
41
|
+
flexGrow: 1,
|
|
42
|
+
flexDirection: 'row',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
justifyContent: 'flex-end',
|
|
43
45
|
},
|
|
44
|
-
|
|
46
|
+
|
|
47
|
+
messageStatusContainer: {
|
|
45
48
|
flexDirection: 'row',
|
|
46
49
|
marginLeft: 5,
|
|
47
50
|
},
|
|
51
|
+
messageStatus: {
|
|
52
|
+
fontSize: 10,
|
|
53
|
+
color: Color.white,
|
|
54
|
+
},
|
|
48
55
|
|
|
49
56
|
usernameContainer: {
|
|
50
57
|
flexDirection: 'row',
|
|
@@ -120,7 +120,10 @@ exports[`Message component should render <Message /> and compare with snapshot 1
|
|
|
120
120
|
<View
|
|
121
121
|
style={
|
|
122
122
|
{
|
|
123
|
-
"
|
|
123
|
+
"alignItems": "center",
|
|
124
|
+
"flexDirection": "row",
|
|
125
|
+
"flexGrow": 1,
|
|
126
|
+
"justifyContent": "flex-end",
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
>
|
|
@@ -307,7 +310,10 @@ exports[`Message component should render <Message /> with Avatar 1`] = `
|
|
|
307
310
|
<View
|
|
308
311
|
style={
|
|
309
312
|
{
|
|
310
|
-
"
|
|
313
|
+
"alignItems": "center",
|
|
314
|
+
"flexDirection": "row",
|
|
315
|
+
"flexGrow": 1,
|
|
316
|
+
"justifyContent": "flex-end",
|
|
311
317
|
}
|
|
312
318
|
}
|
|
313
319
|
>
|
|
@@ -494,7 +500,10 @@ exports[`Message component should render null if user has no Avatar 1`] = `
|
|
|
494
500
|
<View
|
|
495
501
|
style={
|
|
496
502
|
{
|
|
497
|
-
"
|
|
503
|
+
"alignItems": "center",
|
|
504
|
+
"flexDirection": "row",
|
|
505
|
+
"flexGrow": 1,
|
|
506
|
+
"justifyContent": "flex-end",
|
|
498
507
|
}
|
|
499
508
|
}
|
|
500
509
|
>
|