Indicate server on rooms header

This commit is contained in:
Rodrigo Nascimento 2017-08-10 11:59:07 -03:00
parent 038e28c40b
commit af89faef11
1 changed files with 9 additions and 3 deletions

View File

@ -59,9 +59,15 @@ export default class RoomsListView extends React.Component {
navigation: PropTypes.object.isRequired
}
static navigationOptions = () => ({
title: 'Rooms'
});
static navigationOptions = () => {
const server = RocketChat.currentServer ? RocketChat.currentServer.replace(/^https?:\/\//, '') : '';
return {
title: <View style={{ height: 10, width: 200, top: -20 }}>
<Text style={{ textAlign: 'center', fontSize: 16, fontWeight: '600', top: -5 }}>Channels</Text>
<Text style={{ textAlign: 'center', fontSize: 10, top: -5 }}>{server}</Text>
</View>
};
}
constructor(props) {
super(props);