react-native-gifted-chat
Advanced tools
Comparing version 0.2.6 to 0.2.7
{ | ||
"name": "react-native-gifted-chat", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "The most complete chat UI for React Native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -70,7 +70,6 @@ import PropTypes from 'prop-types'; | ||
container: { | ||
marginLeft: 2, | ||
padding: 8, | ||
paddingRight: 0, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
width: 26, | ||
height: 26, | ||
marginLeft: 10, | ||
marginBottom: 10, | ||
}, | ||
@@ -77,0 +76,0 @@ wrapper: { |
@@ -29,13 +29,5 @@ /* | ||
let colorIndex = this.props.user._id; | ||
// If it's a number then use it, otherwise fall back to hashing based on username. | ||
// http://stackoverflow.com/a/1323325/763231 | ||
if (colorIndex % 1 !== 0) { | ||
let sumChars = 0; | ||
for (let i = 0; i < userName.length; i++) { | ||
sumChars += userName.charCodeAt(i); | ||
} | ||
colorIndex = sumChars; | ||
let sumChars = 0; | ||
for(let i = 0; i < userName.length; i++) { | ||
sumChars += userName.charCodeAt(i); | ||
} | ||
@@ -55,3 +47,3 @@ | ||
this.avatarColor = colors[colorIndex % colors.length]; | ||
this.avatarColor = colors[sumChars % colors.length]; | ||
} | ||
@@ -58,0 +50,0 @@ |
@@ -398,3 +398,3 @@ import PropTypes from 'prop-types'; | ||
if (this.props.onInputTextChanged) { | ||
// this.props.onInputTextChanged(''); | ||
this.props.onInputTextChanged(''); | ||
} | ||
@@ -401,0 +401,0 @@ } |
@@ -75,4 +75,3 @@ import PropTypes from 'prop-types'; | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
alignItems: 'flex-end', | ||
}, | ||
@@ -79,0 +78,0 @@ accessory: { |
@@ -139,11 +139,2 @@ import PropTypes from 'prop-types'; | ||
endReachedProps(){ | ||
let condProps = {} | ||
if (this.props.onTopReached){ condProps.onEndReached = this.props.onTopReached } | ||
if (this.props.onTopReachedThreshold){ | ||
condProps.onEndReachedThreshold = this.props.onTopReachedThreshold | ||
} | ||
return condProps | ||
} | ||
render() { | ||
@@ -153,3 +144,2 @@ return ( | ||
<ListView | ||
{...this.endReachedProps()} | ||
enableEmptySections={true} | ||
@@ -156,0 +146,0 @@ automaticallyAdjustContentInsets={false} |
@@ -13,4 +13,2 @@ import PropTypes from 'prop-types'; | ||
render() { | ||
const { onLoad, onError } = this.props.imageProps; | ||
return ( | ||
@@ -26,4 +24,2 @@ <View style={[styles.container, this.props.containerStyle]}> | ||
{...this.props.imageProps} | ||
onLoad={onLoad ? () => onLoad(this.props.currentMessage) : undefined} | ||
onError={onError ? () => onError(this.props.currentMessage) : undefined} | ||
style={[styles.image, this.props.imageStyle]} | ||
@@ -30,0 +26,0 @@ source={{uri: this.props.currentMessage.image}} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186056
2142