Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions app/views/RoomView/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import PropTypes from 'prop-types';
import {
View, Text, StyleSheet, ScrollView, TouchableOpacity
} from 'react-native';
import removeMarkdown from 'remove-markdown';

import shortnameToUnicode from '../../../utils/shortnameToUnicode';
import I18n from '../../../i18n';
import sharedStyles from '../../Styles';
import { isAndroid, isTablet } from '../../../utils/deviceInfo';
import Icon from './Icon';
import { themes } from '../../../constants/colors';
import Markdown from '../../../containers/markdown';

const androidMarginLeft = isTablet ? 0 : 10;

Expand Down Expand Up @@ -75,12 +74,14 @@ const HeaderTitle = React.memo(({
title = I18n.t('Connecting');
}
return (
<Text
<Markdown
preview
msg={title}
style={[styles.title, { fontSize: TITLE_SIZE * scale, color: themes[theme].headerTitleColor }]}
numberOfLines={1}
testID={`room-view-title-${ title }`}
>{title}
</Text>
theme={theme}
/>
);
});

Expand All @@ -102,12 +103,6 @@ const Header = React.memo(({
scale = 0.8;
}
}
if (title) {
title = shortnameToUnicode(title);
if (tmid) {
title = removeMarkdown(title);
}
}

const onPress = () => {
if (!tmid) {
Expand Down