2018-03-29 17:55:37 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2018-10-23 21:39:48 +00:00
|
|
|
import { View, Text, ScrollView } from 'react-native';
|
2020-02-14 00:25:42 +00:00
|
|
|
import { BorderlessButton } from 'react-native-gesture-handler';
|
2019-01-31 16:08:38 +00:00
|
|
|
import { connect } from 'react-redux';
|
2020-05-08 17:36:10 +00:00
|
|
|
import UAParser from 'ua-parser-js';
|
2021-02-01 17:18:55 +00:00
|
|
|
import isEmpty from 'lodash/isEmpty';
|
2020-05-08 17:36:10 +00:00
|
|
|
|
|
|
|
import database from '../../lib/database';
|
2020-02-14 00:25:42 +00:00
|
|
|
import { CustomIcon } from '../../lib/Icons';
|
2019-03-01 16:49:11 +00:00
|
|
|
import Status from '../../containers/Status';
|
2018-03-29 17:55:37 +00:00
|
|
|
import Avatar from '../../containers/Avatar';
|
|
|
|
import styles from './styles';
|
|
|
|
import sharedStyles from '../Styles';
|
|
|
|
import RocketChat from '../../lib/rocketchat';
|
2018-05-18 16:41:47 +00:00
|
|
|
import RoomTypeIcon from '../../containers/RoomTypeIcon';
|
2018-06-01 17:38:13 +00:00
|
|
|
import I18n from '../../i18n';
|
2020-10-30 16:15:58 +00:00
|
|
|
import * as HeaderButton from '../../containers/HeaderButton';
|
2019-03-12 16:23:06 +00:00
|
|
|
import StatusBar from '../../containers/StatusBar';
|
2020-08-05 13:15:56 +00:00
|
|
|
import log, { logEvent, events } from '../../utils/log';
|
2019-12-04 16:39:53 +00:00
|
|
|
import { themes } from '../../constants/colors';
|
|
|
|
import { withTheme } from '../../theme';
|
2020-02-20 20:23:09 +00:00
|
|
|
import Markdown from '../../containers/markdown';
|
2020-07-17 17:08:15 +00:00
|
|
|
import { LISTENER } from '../../containers/Toast';
|
|
|
|
import EventEmitter from '../../utils/events';
|
2018-03-29 17:55:37 +00:00
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
import Livechat from './Livechat';
|
|
|
|
import Channel from './Channel';
|
|
|
|
import Direct from './Direct';
|
2020-06-15 14:00:46 +00:00
|
|
|
import SafeAreaView from '../../containers/SafeAreaView';
|
|
|
|
import { goRoom } from '../../utils/goRoom';
|
|
|
|
import Navigation from '../../lib/Navigation';
|
2020-05-08 17:36:10 +00:00
|
|
|
|
2020-03-30 20:19:01 +00:00
|
|
|
const getRoomTitle = (room, type, name, username, statusText, theme) => (type === 'd'
|
2020-02-14 00:25:42 +00:00
|
|
|
? (
|
|
|
|
<>
|
|
|
|
<Text testID='room-info-view-name' style={[styles.roomTitle, { color: themes[theme].titleText }]}>{ name }</Text>
|
|
|
|
{username && <Text testID='room-info-view-username' style={[styles.roomUsername, { color: themes[theme].auxiliaryText }]}>{`@${ username }`}</Text>}
|
2020-03-30 20:19:01 +00:00
|
|
|
{!!statusText && <View testID='room-info-view-custom-status'><Markdown msg={statusText} style={[styles.roomUsername, { color: themes[theme].auxiliaryText }]} preview theme={theme} /></View>}
|
2020-02-14 00:25:42 +00:00
|
|
|
</>
|
|
|
|
)
|
2018-09-25 19:28:42 +00:00
|
|
|
: (
|
2018-08-31 16:46:33 +00:00
|
|
|
<View style={styles.roomTitleRow}>
|
2021-03-31 17:47:17 +00:00
|
|
|
<RoomTypeIcon type={room.prid ? 'discussion' : room.t} key='room-info-type' status={room.visitor?.status} />
|
2020-04-30 16:24:49 +00:00
|
|
|
<Text testID='room-info-view-name' style={[styles.roomTitle, { color: themes[theme].titleText }]} key='room-info-name'>{RocketChat.getRoomTitle(room)}</Text>
|
2018-08-31 16:46:33 +00:00
|
|
|
</View>
|
2018-09-25 19:28:42 +00:00
|
|
|
)
|
2018-05-23 13:39:18 +00:00
|
|
|
);
|
2018-07-10 13:40:32 +00:00
|
|
|
|
2019-08-07 13:51:34 +00:00
|
|
|
class RoomInfoView extends React.Component {
|
2018-03-29 17:55:37 +00:00
|
|
|
static propTypes = {
|
2019-03-12 16:23:06 +00:00
|
|
|
navigation: PropTypes.object,
|
2020-06-15 14:00:46 +00:00
|
|
|
route: PropTypes.object,
|
2020-05-11 14:19:28 +00:00
|
|
|
rooms: PropTypes.array,
|
2020-06-15 14:00:46 +00:00
|
|
|
theme: PropTypes.string,
|
2020-07-17 17:08:15 +00:00
|
|
|
isMasterDetail: PropTypes.bool,
|
2021-02-25 16:41:44 +00:00
|
|
|
jitsiEnabled: PropTypes.bool,
|
|
|
|
editRoomPermission: PropTypes.array
|
2018-03-29 17:55:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
constructor(props) {
|
2019-05-28 13:03:08 +00:00
|
|
|
super(props);
|
2020-06-15 14:00:46 +00:00
|
|
|
const room = props.route.params?.room;
|
|
|
|
const roomUser = props.route.params?.member;
|
|
|
|
this.rid = props.route.params?.rid;
|
|
|
|
this.t = props.route.params?.t;
|
2018-03-29 17:55:37 +00:00
|
|
|
this.state = {
|
2020-04-01 12:28:54 +00:00
|
|
|
room: room || { rid: this.rid, t: this.t },
|
2020-06-15 14:00:46 +00:00
|
|
|
roomUser: roomUser || {},
|
|
|
|
showEdit: false
|
2018-03-29 17:55:37 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
componentDidMount() {
|
|
|
|
if (this.isDirect) {
|
|
|
|
this.loadUser();
|
|
|
|
} else {
|
|
|
|
this.loadRoom();
|
|
|
|
}
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setHeader();
|
2020-05-08 17:36:10 +00:00
|
|
|
|
|
|
|
const { navigation } = this.props;
|
2020-06-15 14:00:46 +00:00
|
|
|
this.unsubscribeFocus = navigation.addListener('focus', () => {
|
2020-05-08 17:36:10 +00:00
|
|
|
if (this.isLivechat) {
|
|
|
|
this.loadVisitor();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
|
if (this.subscription && this.subscription.unsubscribe) {
|
|
|
|
this.subscription.unsubscribe();
|
|
|
|
}
|
2020-06-15 14:00:46 +00:00
|
|
|
if (this.unsubscribeFocus) {
|
|
|
|
this.unsubscribeFocus();
|
2020-05-08 17:36:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
setHeader = () => {
|
|
|
|
const { roomUser, room, showEdit } = this.state;
|
|
|
|
const { navigation, route } = this.props;
|
|
|
|
const t = route.params?.t;
|
|
|
|
const rid = route.params?.rid;
|
|
|
|
const showCloseModal = route.params?.showCloseModal;
|
|
|
|
navigation.setOptions({
|
2020-10-30 16:15:58 +00:00
|
|
|
headerLeft: showCloseModal ? () => <HeaderButton.CloseModal navigation={navigation} /> : undefined,
|
2020-06-15 14:00:46 +00:00
|
|
|
title: t === 'd' ? I18n.t('User_Info') : I18n.t('Room_Info'),
|
|
|
|
headerRight: showEdit
|
|
|
|
? () => (
|
2020-10-30 16:15:58 +00:00
|
|
|
<HeaderButton.Container>
|
|
|
|
<HeaderButton.Item
|
2020-06-15 14:00:46 +00:00
|
|
|
iconName='edit'
|
2020-08-05 13:15:56 +00:00
|
|
|
onPress={() => {
|
|
|
|
const isLivechat = t === 'l';
|
|
|
|
logEvent(events[`RI_GO_${ isLivechat ? 'LIVECHAT' : 'RI' }_EDIT`]);
|
|
|
|
navigation.navigate(isLivechat ? 'LivechatEditView' : 'RoomInfoEditView', { rid, room, roomUser });
|
|
|
|
}}
|
2020-06-15 14:00:46 +00:00
|
|
|
testID='room-info-view-edit-button'
|
|
|
|
/>
|
2020-10-30 16:15:58 +00:00
|
|
|
</HeaderButton.Container>
|
2020-06-15 14:00:46 +00:00
|
|
|
)
|
|
|
|
: null
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
get isDirect() {
|
|
|
|
const { room } = this.state;
|
|
|
|
return room.t === 'd';
|
|
|
|
}
|
|
|
|
|
|
|
|
get isLivechat() {
|
|
|
|
const { room } = this.state;
|
|
|
|
return room.t === 'l';
|
|
|
|
}
|
|
|
|
|
|
|
|
getRoleDescription = async(id) => {
|
|
|
|
const db = database.active;
|
|
|
|
try {
|
2021-02-26 16:25:51 +00:00
|
|
|
const rolesCollection = db.get('roles');
|
2020-05-08 17:36:10 +00:00
|
|
|
const role = await rolesCollection.find(id);
|
|
|
|
if (role) {
|
|
|
|
return role.description;
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
} catch (e) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
loadVisitor = async() => {
|
|
|
|
const { room } = this.state;
|
|
|
|
try {
|
|
|
|
const result = await RocketChat.getVisitorInfo(room?.visitor?._id);
|
|
|
|
if (result.success) {
|
|
|
|
const { visitor } = result;
|
|
|
|
if (visitor.userAgent) {
|
|
|
|
const ua = new UAParser();
|
|
|
|
ua.setUA(visitor.userAgent);
|
|
|
|
visitor.os = `${ ua.getOS().name } ${ ua.getOS().version }`;
|
|
|
|
visitor.browser = `${ ua.getBrowser().name } ${ ua.getBrowser().version }`;
|
|
|
|
}
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setState({ roomUser: visitor }, () => this.setHeader());
|
2020-05-08 17:36:10 +00:00
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
// Do nothing
|
2020-03-30 20:19:01 +00:00
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
loadUser = async() => {
|
2020-07-17 17:08:15 +00:00
|
|
|
const { room, roomUser } = this.state;
|
2020-03-30 20:19:01 +00:00
|
|
|
|
2021-02-01 17:18:55 +00:00
|
|
|
if (isEmpty(roomUser)) {
|
2019-04-29 16:03:52 +00:00
|
|
|
try {
|
2020-07-17 17:08:15 +00:00
|
|
|
const roomUserId = RocketChat.getUidDirectMessage(room);
|
2019-04-29 16:03:52 +00:00
|
|
|
const result = await RocketChat.getUserInfo(roomUserId);
|
|
|
|
if (result.success) {
|
2020-05-08 17:36:10 +00:00
|
|
|
const { user } = result;
|
|
|
|
const { roles } = user;
|
2019-09-16 20:26:32 +00:00
|
|
|
if (roles && roles.length) {
|
2020-05-08 17:36:10 +00:00
|
|
|
user.parsedRoles = await Promise.all(roles.map(async(role) => {
|
2019-09-16 20:26:32 +00:00
|
|
|
const description = await this.getRoleDescription(role);
|
|
|
|
return description;
|
|
|
|
}));
|
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
|
2020-07-17 17:08:15 +00:00
|
|
|
this.setState({ roomUser: user });
|
2018-12-21 10:55:35 +00:00
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
} catch {
|
|
|
|
// do nothing
|
2018-12-21 10:55:35 +00:00
|
|
|
}
|
2019-08-22 18:08:07 +00:00
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
}
|
2020-04-01 12:28:54 +00:00
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
loadRoom = async() => {
|
2020-07-31 18:22:30 +00:00
|
|
|
const { room: roomState } = this.state;
|
2021-02-25 16:41:44 +00:00
|
|
|
const { route, editRoomPermission } = this.props;
|
2020-06-15 14:00:46 +00:00
|
|
|
let room = route.params?.room;
|
2019-09-16 20:26:32 +00:00
|
|
|
if (room && room.observe) {
|
|
|
|
this.roomObservable = room.observe();
|
|
|
|
this.subscription = this.roomObservable
|
|
|
|
.subscribe((changes) => {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setState({ room: changes }, () => this.setHeader());
|
2019-09-16 20:26:32 +00:00
|
|
|
});
|
2019-08-22 18:08:07 +00:00
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
const result = await RocketChat.getRoomInfo(this.rid);
|
|
|
|
if (result.success) {
|
2020-05-08 17:36:10 +00:00
|
|
|
({ room } = result);
|
2020-07-31 18:22:30 +00:00
|
|
|
this.setState({ room: { ...roomState, ...room } });
|
2019-08-22 18:08:07 +00:00
|
|
|
}
|
2019-08-30 12:43:23 +00:00
|
|
|
} catch (e) {
|
|
|
|
log(e);
|
2019-08-22 18:08:07 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
|
2021-02-25 16:41:44 +00:00
|
|
|
const permissions = await RocketChat.hasPermission([editRoomPermission], room.rid);
|
|
|
|
if (permissions[0] && !room.prid) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setState({ showEdit: true }, () => this.setHeader());
|
2018-12-21 10:55:35 +00:00
|
|
|
}
|
2018-03-29 17:55:37 +00:00
|
|
|
}
|
|
|
|
|
2020-07-17 17:08:15 +00:00
|
|
|
createDirect = () => new Promise(async(resolve, reject) => {
|
|
|
|
const { route } = this.props;
|
|
|
|
|
|
|
|
// We don't need to create a direct
|
|
|
|
const member = route.params?.member;
|
2021-02-01 17:18:55 +00:00
|
|
|
if (!isEmpty(member)) {
|
2020-07-17 17:08:15 +00:00
|
|
|
return resolve();
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Check if some direct with the user already exists on database
|
2019-09-16 20:26:32 +00:00
|
|
|
try {
|
2020-07-17 17:08:15 +00:00
|
|
|
const { roomUser: { username } } = this.state;
|
2020-05-08 17:36:10 +00:00
|
|
|
const result = await RocketChat.createDirectMessage(username);
|
|
|
|
if (result.success) {
|
2020-07-17 17:08:15 +00:00
|
|
|
const { room: { rid } } = result;
|
|
|
|
return this.setState(({ room }) => ({ room: { ...room, rid } }), resolve);
|
2019-09-16 20:26:32 +00:00
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
} catch {
|
|
|
|
// do nothing
|
2018-09-25 19:28:42 +00:00
|
|
|
}
|
2020-07-17 17:08:15 +00:00
|
|
|
reject();
|
|
|
|
})
|
2018-06-01 17:38:13 +00:00
|
|
|
|
2020-05-11 14:19:28 +00:00
|
|
|
goRoom = () => {
|
2020-08-05 13:15:56 +00:00
|
|
|
logEvent(events.RI_GO_ROOM_USER);
|
2020-05-08 17:36:10 +00:00
|
|
|
const { roomUser, room } = this.state;
|
2020-05-11 14:19:28 +00:00
|
|
|
const { name, username } = roomUser;
|
2020-06-15 14:00:46 +00:00
|
|
|
const { rooms, navigation, isMasterDetail } = this.props;
|
|
|
|
const params = {
|
|
|
|
rid: room.rid,
|
|
|
|
name: RocketChat.getRoomTitle({
|
|
|
|
t: room.t,
|
|
|
|
fname: name,
|
|
|
|
name: username
|
|
|
|
}),
|
|
|
|
t: room.t,
|
|
|
|
roomUserId: RocketChat.getUidDirectMessage(room)
|
|
|
|
};
|
2020-05-11 14:19:28 +00:00
|
|
|
|
|
|
|
if (room.rid) {
|
2020-06-15 14:00:46 +00:00
|
|
|
// if it's on master detail layout, we close the modal and replace RoomView
|
|
|
|
if (isMasterDetail) {
|
|
|
|
Navigation.navigate('DrawerNavigator');
|
|
|
|
goRoom({ item: params, isMasterDetail });
|
|
|
|
} else {
|
|
|
|
let navigate = navigation.push;
|
|
|
|
// if this is a room focused
|
|
|
|
if (rooms.includes(room.rid)) {
|
|
|
|
({ navigate } = navigation);
|
|
|
|
}
|
|
|
|
navigate('RoomView', params);
|
2020-02-14 00:25:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
videoCall = () => {
|
|
|
|
const { room } = this.state;
|
2021-02-22 21:37:13 +00:00
|
|
|
RocketChat.callJitsi(room);
|
2018-03-29 17:55:37 +00:00
|
|
|
}
|
|
|
|
|
2018-09-25 19:28:42 +00:00
|
|
|
renderAvatar = (room, roomUser) => {
|
2020-10-30 13:12:02 +00:00
|
|
|
const { theme } = this.props;
|
2018-09-25 19:28:42 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Avatar
|
2019-08-22 18:08:07 +00:00
|
|
|
text={room.name || roomUser.username}
|
2018-09-25 19:28:42 +00:00
|
|
|
style={styles.avatar}
|
2019-08-22 18:08:07 +00:00
|
|
|
type={this.t}
|
2020-10-30 13:12:02 +00:00
|
|
|
size={100}
|
2020-10-30 13:51:04 +00:00
|
|
|
rid={room?.rid}
|
2018-09-25 19:28:42 +00:00
|
|
|
>
|
2021-03-31 17:47:17 +00:00
|
|
|
{this.t === 'd' && roomUser._id
|
|
|
|
? (
|
|
|
|
<View style={[sharedStyles.status, { backgroundColor: themes[theme].auxiliaryBackground }]}>
|
|
|
|
<Status size={20} id={roomUser._id} />
|
|
|
|
</View>
|
|
|
|
)
|
|
|
|
: null}
|
2018-09-25 19:28:42 +00:00
|
|
|
</Avatar>
|
|
|
|
);
|
|
|
|
}
|
2018-05-18 17:55:08 +00:00
|
|
|
|
2020-02-14 00:25:42 +00:00
|
|
|
renderButton = (onPress, iconName, text) => {
|
|
|
|
const { theme } = this.props;
|
2020-07-17 17:08:15 +00:00
|
|
|
|
|
|
|
const onActionPress = async() => {
|
|
|
|
try {
|
2021-04-01 13:54:39 +00:00
|
|
|
if (this.isDirect) {
|
|
|
|
await this.createDirect();
|
|
|
|
}
|
2020-07-17 17:08:15 +00:00
|
|
|
onPress();
|
|
|
|
} catch {
|
|
|
|
EventEmitter.emit(LISTENER, { message: I18n.t('error-action-not-allowed', { action: I18n.t('Create_Direct_Messages') }) });
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-02-14 00:25:42 +00:00
|
|
|
return (
|
|
|
|
<BorderlessButton
|
2020-07-17 17:08:15 +00:00
|
|
|
onPress={onActionPress}
|
2020-02-14 00:25:42 +00:00
|
|
|
style={styles.roomButton}
|
|
|
|
>
|
|
|
|
<CustomIcon
|
|
|
|
name={iconName}
|
|
|
|
size={30}
|
|
|
|
color={themes[theme].actionTintColor}
|
|
|
|
/>
|
|
|
|
<Text style={[styles.roomButtonText, { color: themes[theme].actionTintColor }]}>{text}</Text>
|
|
|
|
</BorderlessButton>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-07-17 17:08:15 +00:00
|
|
|
renderButtons = () => {
|
|
|
|
const { jitsiEnabled } = this.props;
|
|
|
|
return (
|
|
|
|
<View style={styles.roomButtonsContainer}>
|
|
|
|
{this.renderButton(this.goRoom, 'message', I18n.t('Message'))}
|
2021-04-01 13:54:39 +00:00
|
|
|
{jitsiEnabled && this.isDirect ? this.renderButton(this.videoCall, 'camera', I18n.t('Video_call')) : null}
|
2020-07-17 17:08:15 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2020-02-14 00:25:42 +00:00
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
renderContent = () => {
|
|
|
|
const { room, roomUser } = this.state;
|
|
|
|
const { theme } = this.props;
|
2019-08-22 18:08:07 +00:00
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
if (this.isDirect) {
|
|
|
|
return <Direct roomUser={roomUser} theme={theme} />;
|
|
|
|
} else if (this.t === 'l') {
|
|
|
|
return <Livechat room={room} roomUser={roomUser} theme={theme} />;
|
|
|
|
}
|
|
|
|
return <Channel room={room} theme={theme} />;
|
2019-08-22 18:08:07 +00:00
|
|
|
}
|
|
|
|
|
2018-03-29 17:55:37 +00:00
|
|
|
render() {
|
|
|
|
const { room, roomUser } = this.state;
|
2019-12-04 16:39:53 +00:00
|
|
|
const { theme } = this.props;
|
2018-03-29 17:55:37 +00:00
|
|
|
return (
|
2019-12-04 16:39:53 +00:00
|
|
|
<ScrollView style={[styles.scroll, { backgroundColor: themes[theme].backgroundColor }]}>
|
2020-10-30 13:59:44 +00:00
|
|
|
<StatusBar />
|
2019-12-04 16:39:53 +00:00
|
|
|
<SafeAreaView
|
2020-06-15 14:00:46 +00:00
|
|
|
style={{ backgroundColor: themes[theme].backgroundColor }}
|
2019-12-04 16:39:53 +00:00
|
|
|
testID='room-info-view'
|
|
|
|
>
|
2021-04-01 13:54:39 +00:00
|
|
|
<View style={[styles.avatarContainer, { backgroundColor: themes[theme].auxiliaryBackground }]}>
|
2018-08-01 19:35:06 +00:00
|
|
|
{this.renderAvatar(room, roomUser)}
|
2020-05-08 17:36:10 +00:00
|
|
|
<View style={styles.roomTitleContainer}>{ getRoomTitle(room, this.t, roomUser?.name, roomUser?.username, roomUser?.statusText, theme) }</View>
|
2021-04-01 13:54:39 +00:00
|
|
|
{this.renderButtons()}
|
2018-08-01 19:35:06 +00:00
|
|
|
</View>
|
2020-05-08 17:36:10 +00:00
|
|
|
{this.renderContent()}
|
2018-08-01 19:35:06 +00:00
|
|
|
</SafeAreaView>
|
2018-03-29 17:55:37 +00:00
|
|
|
</ScrollView>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2019-08-07 13:51:34 +00:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2020-06-15 14:00:46 +00:00
|
|
|
rooms: state.room.rooms,
|
2020-07-17 17:08:15 +00:00
|
|
|
isMasterDetail: state.app.isMasterDetail,
|
2021-02-25 16:41:44 +00:00
|
|
|
jitsiEnabled: state.settings.Jitsi_Enabled || false,
|
|
|
|
editRoomPermission: state.permissions['edit-room']
|
2019-08-07 13:51:34 +00:00
|
|
|
});
|
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
export default connect(mapStateToProps)(withTheme(RoomInfoView));
|