diff --git a/app/components/Message.js b/app/components/Message.js index 0ae5a4b95..43e93c45f 100644 --- a/app/components/Message.js +++ b/app/components/Message.js @@ -2,6 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import { View, Text, StyleSheet } from 'react-native'; import { CachedImage } from 'react-native-img-cache'; +import Markdown from 'react-native-easy-markdown'; +import { emojify } from 'react-emojione'; const styles = StyleSheet.create({ message: { @@ -46,6 +48,8 @@ export default class Message extends React.PureComponent { extraStyle.opacity = 0.3; } + const msg = emojify(this.props.item.msg || 'asd', { output: 'unicode' }); + return ( @@ -55,12 +59,9 @@ export default class Message extends React.PureComponent { {this.props.item.u.username} - - {this.props.item.msg} - - {/* - {this.props.item.msg} - */} + + {msg} + ); diff --git a/app/views/room.js b/app/views/room.js index 1fd2832a9..6c21f90dd 100644 --- a/app/views/room.js +++ b/app/views/room.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Text, View, FlatList, StyleSheet } from 'react-native'; -// import Markdown from 'react-native-simple-markdown'; import realm from '../lib/realm'; import RocketChat from '../lib/rocketchat'; diff --git a/package.json b/package.json index ed744aa03..b1e15a985 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "dependencies": { "prop-types": "^15.5.10", "react": "16.0.0-alpha.12", + "react-emojione": "^3.1.10", "react-native": "0.46.1", + "react-native-easy-markdown": "git+https://github.com/lappalj4/react-native-easy-markdown.git", "react-native-fetch-blob": "^0.10.8", "react-native-img-cache": "^1.4.0", "react-native-meteor": "^1.1.0",