This commit is contained in:
Diego Mello 2017-12-05 14:59:40 -02:00
parent 823a35a2ba
commit a52b81f070
3 changed files with 5 additions and 26 deletions

View File

@ -40,7 +40,7 @@ const styles = StyleSheet.create({
},
appBar: {
flex: 1,
marginTop: 20
marginTop: Platform.OS === 'ios' ? 20 : 0
},
header: {
flexDirection: 'row',
@ -51,8 +51,8 @@ const styles = StyleSheet.create({
left: TITLE_OFFSET,
right: TITLE_OFFSET,
position: 'absolute',
alignItems: Platform.OS === 'ios' ? 'center' : 'flex-start',
justifyContent: 'center',
alignItems: 'center',
justifyContent: Platform.OS === 'ios' ? 'center' : 'flex-start',
flexDirection: 'row'
},
status: {

View File

@ -4,6 +4,7 @@ import { StackNavigator, DrawerNavigator } from 'react-navigation';
import Sidebar from '../../containers/Sidebar';
import DrawerMenuButton from '../../presentation/DrawerMenuButton';
import Header from '../../containers/Header';
import RoomsListView from '../../views/RoomsListView';
import RoomView from '../../views/RoomView';
@ -20,7 +21,7 @@ const AuthRoutes = StackNavigator(
navigationOptions({ navigation }) {
return {
title: 'Rooms',
[drawerIconPosition]: <DrawerMenuButton navigation={navigation} />
header: <Header navigation={navigation} />
};
}
},

View File

@ -12,7 +12,6 @@ import RocketChat from '../lib/rocketchat';
import RoomItem from '../presentation/RoomItem';
import Banner from '../containers/Banner';
import { goRoom } from '../containers/routes/NavigationService';
import Header from '../containers/Header';
const styles = StyleSheet.create({
container: {
@ -80,27 +79,6 @@ export default class RoomsListView extends React.Component {
server: PropTypes.string
}
static navigationOptions = ({ navigation }) => {
if (Platform.OS !== 'ios') {
return;
}
const { params = {} } = navigation.state;
const headerRight = (
<Icon.Button
name='ios-create-outline'
color='blue'
size={26}
backgroundColor='transparent'
onPress={params.createChannel}
/>);
return {
header: <Header navigation={navigation} />,
headerRight
};
};
constructor(props) {
super(props);