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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gifted-chat",
3
- "version": "3.1.0",
3
+ "version": "3.1.3",
4
4
  "description": "The most complete chat UI for React Native",
5
5
  "keywords": [
6
6
  "android",
@@ -13,7 +13,7 @@ import { MessageVideo } from '../MessageVideo'
13
13
  import { IMessage } from '../Models'
14
14
  import { QuickReplies } from '../QuickReplies'
15
15
 
16
- import stylesCommon, { getStyleWithPosition } from '../styles'
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.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={styles.messageTimeAndStatusContainer}>
366
366
  {renderTime()}
367
367
  {renderTicks()}
368
368
  </View>
@@ -37,14 +37,21 @@ const styles = StyleSheet.create({
37
37
  borderTopRightRadius: 3,
38
38
  },
39
39
 
40
- tick: {
41
- fontSize: 10,
42
- color: Color.white,
40
+ messageTimeAndStatusContainer: {
41
+ flexGrow: 1,
42
+ flexDirection: 'row',
43
+ alignItems: 'center',
44
+ justifyContent: 'flex-end',
43
45
  },
44
- tickView: {
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',
@@ -97,7 +97,10 @@ exports[`should render <Bubble /> and compare with snapshot 1`] = `
97
97
  <View
98
98
  style={
99
99
  {
100
- "flex": 1,
100
+ "alignItems": "center",
101
+ "flexDirection": "row",
102
+ "flexGrow": 1,
103
+ "justifyContent": "flex-end",
101
104
  }
102
105
  }
103
106
  >
@@ -120,7 +120,10 @@ exports[`Message component should render <Message /> and compare with snapshot 1
120
120
  <View
121
121
  style={
122
122
  {
123
- "flex": 1,
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
- "flex": 1,
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
- "flex": 1,
503
+ "alignItems": "center",
504
+ "flexDirection": "row",
505
+ "flexGrow": 1,
506
+ "justifyContent": "flex-end",
498
507
  }
499
508
  }
500
509
  >