Improve message layout
This commit is contained in:
parent
60859b43cd
commit
9a5b474183
|
@ -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,
|
||||||
|
|
|
@ -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}
|
||||||
|
|
Loading…
Reference in New Issue