Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make links clickable #1730

Merged
merged 8 commits into from
Feb 20, 2020
13 changes: 7 additions & 6 deletions app/views/RoomInfoView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { themes } from '../../constants/colors';
import { withTheme } from '../../theme';
import { themedHeader } from '../../utils/navigation';
import { getUserSelector } from '../../selectors/login';
import Markdown from '../../containers/markdown';

const PERMISSION_EDIT_ROOM = 'edit-room';
const camelize = str => str.replace(/^(.)/, (match, chr) => chr.toUpperCase());
Expand Down Expand Up @@ -172,12 +173,12 @@ class RoomInfoView extends React.Component {
const { theme } = this.props;
return (
<View style={styles.item}>
<Text style={[styles.itemLabel, { color: themes[theme].titleText }]}>{I18n.t(camelize(key))}</Text>
<Text
style={[styles.itemContent, !room[key] && styles.itemContent__empty, { color: themes[theme].auxiliaryText }]}
testID={`room-info-view-${ key }`}
>{ room[key] ? room[key] : I18n.t(`No_${ key }_provided`) }
</Text>
<Text style={[styles.itemLabel, { color: themes[theme].auxiliaryText }]}>{I18n.t(camelize(key))}</Text>
<Markdown
useMarkdown
msg={room[key] ? room[key] : `__${ I18n.t(`No_${ key }_provided`) }__`}
theme={theme}
/>
</View>
);
}
Expand Down