RoomView header
This commit is contained in:
parent
e4de36d25d
commit
f764527d60
app/views/RoomView
|
@ -18,7 +18,8 @@ const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
marginRight: isAndroid ? 15 : 5,
|
marginRight: isAndroid ? 15 : 5,
|
||||||
marginLeft: isAndroid ? androidMarginLeft : -10
|
marginLeft: isAndroid ? androidMarginLeft : -10,
|
||||||
|
justifyContent: 'center'
|
||||||
},
|
},
|
||||||
titleContainer: {
|
titleContainer: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
// import { HeaderBackButton } from 'react-navigation-stack';
|
import { HeaderBackButton } from '@react-navigation/stack';
|
||||||
|
|
||||||
import { isIOS } from '../../../utils/deviceInfo';
|
import { isIOS } from '../../../utils/deviceInfo';
|
||||||
import { themes } from '../../../constants/colors';
|
import { themes } from '../../../constants/colors';
|
||||||
|
@ -18,15 +18,14 @@ const RoomHeaderLeft = ({
|
||||||
tmid, unreadsCount, navigation, baseUrl, userId, token, title, t, theme, goRoomActionsView, split
|
tmid, unreadsCount, navigation, baseUrl, userId, token, title, t, theme, goRoomActionsView, split
|
||||||
}) => {
|
}) => {
|
||||||
if (!split || tmid) {
|
if (!split || tmid) {
|
||||||
// return (
|
return (
|
||||||
// <HeaderBackButton
|
<HeaderBackButton
|
||||||
// title={unreadsCount > 999 ? '+999' : unreadsCount || ' '}
|
label={unreadsCount > 999 ? '+999' : unreadsCount || ' '}
|
||||||
// backTitleVisible={isIOS}
|
// backTitleVisible={isIOS}
|
||||||
// onPress={() => navigation.goBack()}
|
onPress={() => navigation.goBack()}
|
||||||
// tintColor={themes[theme].headerTintColor}
|
tintColor={themes[theme].headerTintColor}
|
||||||
// />
|
/>
|
||||||
// );
|
);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
if (baseUrl && userId && token) {
|
if (baseUrl && userId && token) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1041,21 +1041,20 @@ RoomView.navigationOptions = ({ navigation, route }) => {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
// headerTitle: (
|
headerTitle: () => (
|
||||||
// <RoomHeaderView
|
<RoomHeaderView
|
||||||
// rid={rid}
|
rid={rid}
|
||||||
// prid={prid}
|
prid={prid}
|
||||||
// tmid={tmid}
|
tmid={tmid}
|
||||||
// title={title}
|
title={title}
|
||||||
// subtitle={subtitle}
|
subtitle={subtitle}
|
||||||
// type={t}
|
type={t}
|
||||||
// widthOffset={tmid ? 95 : 130}
|
widthOffset={tmid ? 95 : 130}
|
||||||
// roomUserId={roomUserId}
|
roomUserId={roomUserId}
|
||||||
// visitor={visitor}
|
visitor={visitor}
|
||||||
// goRoomActionsView={goRoomActionsView}
|
goRoomActionsView={goRoomActionsView}
|
||||||
// />
|
/>
|
||||||
// ),
|
),
|
||||||
title: 'asdahsdohia',
|
|
||||||
headerRight: () => (
|
headerRight: () => (
|
||||||
<RightButtons
|
<RightButtons
|
||||||
rid={rid}
|
rid={rid}
|
||||||
|
@ -1065,21 +1064,21 @@ RoomView.navigationOptions = ({ navigation, route }) => {
|
||||||
toggleFollowThread={toggleFollowThread}
|
toggleFollowThread={toggleFollowThread}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
// headerLeft: () => (
|
headerLeft: () => (
|
||||||
// <RoomHeaderLeft
|
<RoomHeaderLeft
|
||||||
// tmid={tmid}
|
tmid={tmid}
|
||||||
// unreadsCount={unreadsCount}
|
unreadsCount={unreadsCount}
|
||||||
// navigation={navigation}
|
navigation={navigation}
|
||||||
// baseUrl={baseUrl}
|
baseUrl={baseUrl}
|
||||||
// userId={userId}
|
userId={userId}
|
||||||
// token={token}
|
token={token}
|
||||||
// title={avatar}
|
title={avatar}
|
||||||
// theme='light' // TODO: ?
|
theme='light' // TODO: ?
|
||||||
// t={t}
|
t={t}
|
||||||
// goRoomActionsView={goRoomActionsView}
|
goRoomActionsView={goRoomActionsView}
|
||||||
// split={false} // TODO: ?
|
split={false} // TODO: ?
|
||||||
// />
|
/>
|
||||||
// )
|
)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue