From f764527d60fc70f0d8cb0f7420b7ddae20cc0204 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 21 May 2020 15:34:04 -0300 Subject: [PATCH] RoomView header --- app/views/RoomView/Header/Header.js | 3 +- app/views/RoomView/Header/RoomHeaderLeft.js | 19 ++++--- app/views/RoomView/index.js | 59 ++++++++++----------- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/app/views/RoomView/Header/Header.js b/app/views/RoomView/Header/Header.js index d9b527550..8d56f975e 100644 --- a/app/views/RoomView/Header/Header.js +++ b/app/views/RoomView/Header/Header.js @@ -18,7 +18,8 @@ const styles = StyleSheet.create({ container: { flex: 1, marginRight: isAndroid ? 15 : 5, - marginLeft: isAndroid ? androidMarginLeft : -10 + marginLeft: isAndroid ? androidMarginLeft : -10, + justifyContent: 'center' }, titleContainer: { alignItems: 'center', diff --git a/app/views/RoomView/Header/RoomHeaderLeft.js b/app/views/RoomView/Header/RoomHeaderLeft.js index bf180f3e4..03de94962 100644 --- a/app/views/RoomView/Header/RoomHeaderLeft.js +++ b/app/views/RoomView/Header/RoomHeaderLeft.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { StyleSheet } from 'react-native'; -// import { HeaderBackButton } from 'react-navigation-stack'; +import { HeaderBackButton } from '@react-navigation/stack'; import { isIOS } from '../../../utils/deviceInfo'; import { themes } from '../../../constants/colors'; @@ -18,15 +18,14 @@ const RoomHeaderLeft = ({ tmid, unreadsCount, navigation, baseUrl, userId, token, title, t, theme, goRoomActionsView, split }) => { if (!split || tmid) { - // return ( - // 999 ? '+999' : unreadsCount || ' '} - // backTitleVisible={isIOS} - // onPress={() => navigation.goBack()} - // tintColor={themes[theme].headerTintColor} - // /> - // ); - return null; + return ( + 999 ? '+999' : unreadsCount || ' '} + // backTitleVisible={isIOS} + onPress={() => navigation.goBack()} + tintColor={themes[theme].headerTintColor} + /> + ); } if (baseUrl && userId && token) { return ( diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index 98d9a9944..13a4dcd99 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -1041,21 +1041,20 @@ RoomView.navigationOptions = ({ navigation, route }) => { return {}; } return { - // headerTitle: ( - // - // ), - title: 'asdahsdohia', + headerTitle: () => ( + + ), headerRight: () => ( { toggleFollowThread={toggleFollowThread} /> ), - // headerLeft: () => ( - // - // ) + headerLeft: () => ( + + ) }; };