Improve message layout

This commit is contained in:
Rodrigo Nascimento 2017-08-10 12:16:47 -03:00
parent 60859b43cd
commit 9a5b474183
2 changed files with 4 additions and 8 deletions

View File

@ -7,13 +7,14 @@ import { emojify } from 'react-emojione';
const styles = StyleSheet.create({ const styles = StyleSheet.create({
message: { message: {
borderColor: '#aaa', padding: 12,
padding: 14, paddingTop: 6,
paddingBottom: 6,
flexDirection: 'row', flexDirection: 'row',
transform: [{ scaleY: -1 }] transform: [{ scaleY: -1 }]
}, },
avatarContainer: { avatarContainer: {
backgroundColor: '#ccc', backgroundColor: '#eee',
width: 40, width: 40,
height: 40, height: 40,
marginRight: 10, marginRight: 10,

View File

@ -77,10 +77,6 @@ export default class RoomView extends React.Component {
sendMessage = message => RocketChat.sendMessage(this.rid, message); sendMessage = message => RocketChat.sendMessage(this.rid, message);
renderSeparator = () => (
<View style={styles.separator} />
);
renderItem = ({ item }) => ( renderItem = ({ item }) => (
<Message <Message
id={item._id} id={item._id}
@ -110,7 +106,6 @@ export default class RoomView extends React.Component {
extraData={this.state} extraData={this.state}
renderItem={this.renderItem} renderItem={this.renderItem}
keyExtractor={item => item._id} keyExtractor={item => item._id}
ItemSeparatorComponent={this.renderSeparator}
/> />
<MessageBox <MessageBox
onSubmit={this.sendMessage} onSubmit={this.sendMessage}