react-native-gifted-chat 3.1.0 → 3.1.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gifted-chat",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "The most complete chat UI for React Native",
5
5
  "keywords": [
6
6
  "android",
@@ -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.tickView}>
240
+ <View style={styles.messageStatusContainer}>
241
241
  {!!currentMessage.sent && (
242
- <Text style={[styles.tick, props.tickStyle]}>
242
+ <Text style={[styles.messageStatus, props.tickStyle]}>
243
243
  {'✓'}
244
244
  </Text>
245
245
  )}
246
246
  {!!currentMessage.received && (
247
- <Text style={[styles.tick, props.tickStyle]}>
247
+ <Text style={[styles.messageStatus, props.tickStyle]}>
248
248
  {'✓'}
249
249
  </Text>
250
250
  )}
251
251
  {!!currentMessage.pending && (
252
- <Text style={[styles.tick, props.tickStyle]}>
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={stylesCommon.fill}>
365
+ <View style={[stylesCommon.fill, styles.messageTimeAndStatusContainer]}>
366
366
  {renderTime()}
367
367
  {renderTicks()}
368
368
  </View>
@@ -37,14 +37,20 @@ const styles = StyleSheet.create({
37
37
  borderTopRightRadius: 3,
38
38
  },
39
39
 
40
- tick: {
41
- fontSize: 10,
42
- color: Color.white,
40
+ messageTimeAndStatusContainer: {
41
+ flexDirection: 'row',
42
+ alignItems: 'center',
43
+ justifyContent: 'flex-end',
43
44
  },
44
- tickView: {
45
+
46
+ messageStatusContainer: {
45
47
  flexDirection: 'row',
46
48
  marginLeft: 5,
47
49
  },
50
+ messageStatus: {
51
+ fontSize: 10,
52
+ color: Color.white,
53
+ },
48
54
 
49
55
  usernameContainer: {
50
56
  flexDirection: 'row',
@@ -96,9 +96,16 @@ exports[`should render <Bubble /> and compare with snapshot 1`] = `
96
96
  >
97
97
  <View
98
98
  style={
99
- {
100
- "flex": 1,
101
- }
99
+ [
100
+ {
101
+ "flex": 1,
102
+ },
103
+ {
104
+ "alignItems": "center",
105
+ "flexDirection": "row",
106
+ "justifyContent": "flex-end",
107
+ },
108
+ ]
102
109
  }
103
110
  >
104
111
  <View>
@@ -119,9 +119,16 @@ exports[`Message component should render <Message /> and compare with snapshot 1
119
119
  >
120
120
  <View
121
121
  style={
122
- {
123
- "flex": 1,
124
- }
122
+ [
123
+ {
124
+ "flex": 1,
125
+ },
126
+ {
127
+ "alignItems": "center",
128
+ "flexDirection": "row",
129
+ "justifyContent": "flex-end",
130
+ },
131
+ ]
125
132
  }
126
133
  >
127
134
  <View>
@@ -306,9 +313,16 @@ exports[`Message component should render <Message /> with Avatar 1`] = `
306
313
  >
307
314
  <View
308
315
  style={
309
- {
310
- "flex": 1,
311
- }
316
+ [
317
+ {
318
+ "flex": 1,
319
+ },
320
+ {
321
+ "alignItems": "center",
322
+ "flexDirection": "row",
323
+ "justifyContent": "flex-end",
324
+ },
325
+ ]
312
326
  }
313
327
  >
314
328
  <View>
@@ -493,9 +507,16 @@ exports[`Message component should render null if user has no Avatar 1`] = `
493
507
  >
494
508
  <View
495
509
  style={
496
- {
497
- "flex": 1,
498
- }
510
+ [
511
+ {
512
+ "flex": 1,
513
+ },
514
+ {
515
+ "alignItems": "center",
516
+ "flexDirection": "row",
517
+ "justifyContent": "flex-end",
518
+ },
519
+ ]
499
520
  }
500
521
  >
501
522
  <View>