diff --git a/app/actions/actionsTypes.js b/app/actions/actionsTypes.js
index ad8964391..8fda57def 100644
--- a/app/actions/actionsTypes.js
+++ b/app/actions/actionsTypes.js
@@ -50,7 +50,6 @@ export const SNIPPETED_MESSAGES = createRequestTypes('SNIPPETED_MESSAGES', ['OPE
export const DEEP_LINKING = createRequestTypes('DEEP_LINKING', ['OPEN']);
export const SORT_PREFERENCES = createRequestTypes('SORT_PREFERENCES', ['SET_ALL', 'SET']);
export const NOTIFICATION = createRequestTypes('NOTIFICATION', ['RECEIVED', 'REMOVE']);
-export const TOGGLE_MARKDOWN = 'TOGGLE_MARKDOWN';
export const TOGGLE_CRASH_REPORT = 'TOGGLE_CRASH_REPORT';
export const SET_CUSTOM_EMOJIS = 'SET_CUSTOM_EMOJIS';
export const SET_ACTIVE_USERS = 'SET_ACTIVE_USERS';
diff --git a/app/actions/markdown.js b/app/actions/markdown.js
deleted file mode 100644
index d33075a38..000000000
--- a/app/actions/markdown.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import * as types from './actionsTypes';
-
-export function toggleMarkdown(value) {
- return {
- type: types.TOGGLE_MARKDOWN,
- payload: value
- };
-}
diff --git a/app/containers/MessageBox/ReplyPreview.js b/app/containers/MessageBox/ReplyPreview.js
index 54d872ebd..a755598be 100644
--- a/app/containers/MessageBox/ReplyPreview.js
+++ b/app/containers/MessageBox/ReplyPreview.js
@@ -42,7 +42,7 @@ const styles = StyleSheet.create({
});
const ReplyPreview = React.memo(({
- message, Message_TimeFormat, baseUrl, username, useMarkdown, replying, getCustomEmoji, close, theme
+ message, Message_TimeFormat, baseUrl, username, replying, getCustomEmoji, close, theme
}) => {
if (!replying) {
return null;
@@ -67,7 +67,6 @@ const ReplyPreview = React.memo(({
username={username}
getCustomEmoji={getCustomEmoji}
numberOfLines={1}
- useMarkdown={useMarkdown}
preview
theme={theme}
/>
@@ -79,7 +78,6 @@ const ReplyPreview = React.memo(({
ReplyPreview.propTypes = {
replying: PropTypes.bool,
- useMarkdown: PropTypes.bool,
message: PropTypes.object.isRequired,
Message_TimeFormat: PropTypes.string.isRequired,
close: PropTypes.func.isRequired,
@@ -90,7 +88,6 @@ ReplyPreview.propTypes = {
};
const mapStateToProps = state => ({
- useMarkdown: state.markdown.useMarkdown,
Message_TimeFormat: state.settings.Message_TimeFormat,
baseUrl: state.server.server
});
diff --git a/app/containers/markdown/index.js b/app/containers/markdown/index.js
index 0a446ee4b..7e7812bed 100644
--- a/app/containers/markdown/index.js
+++ b/app/containers/markdown/index.js
@@ -71,7 +71,6 @@ class Markdown extends PureComponent {
tmid: PropTypes.string,
isEdited: PropTypes.bool,
numberOfLines: PropTypes.number,
- useMarkdown: PropTypes.bool,
customEmojis: PropTypes.bool,
useRealName: PropTypes.bool,
channels: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
@@ -368,9 +367,7 @@ class Markdown extends PureComponent {
}
render() {
- const {
- msg, useMarkdown = true, numberOfLines, preview = false, theme
- } = this.props;
+ const { msg, preview = false } = this.props;
if (!msg) {
return null;
@@ -389,10 +386,6 @@ class Markdown extends PureComponent {
return this.renderer.render(ast);
}
- if (!useMarkdown && !preview) {
- return {m};
- }
-
const ast = parser.parse(m);
this.isMessageContainsOnlyEmoji = isOnlyEmoji(m) && emojiCount(m) <= 3;
diff --git a/app/containers/message/Attachments.js b/app/containers/message/Attachments.js
index dc1f06847..cf3f6106c 100644
--- a/app/containers/message/Attachments.js
+++ b/app/containers/message/Attachments.js
@@ -8,7 +8,7 @@ import Video from './Video';
import Reply from './Reply';
const Attachments = React.memo(({
- attachments, timeFormat, user, baseUrl, useMarkdown, showAttachment, getCustomEmoji, theme
+ attachments, timeFormat, user, baseUrl, showAttachment, getCustomEmoji, theme
}) => {
if (!attachments || attachments.length === 0) {
return null;
@@ -16,17 +16,17 @@ const Attachments = React.memo(({
return attachments.map((file, index) => {
if (file.image_url) {
- return ;
+ return ;
}
if (file.audio_url) {
- return ;
+ return ;
}
if (file.video_url) {
- return ;
+ return ;
}
// eslint-disable-next-line react/no-array-index-key
- return ;
+ return ;
});
}, (prevProps, nextProps) => isEqual(prevProps.attachments, nextProps.attachments) && prevProps.theme === nextProps.theme);
@@ -35,7 +35,6 @@ Attachments.propTypes = {
timeFormat: PropTypes.string,
user: PropTypes.object,
baseUrl: PropTypes.string,
- useMarkdown: PropTypes.bool,
showAttachment: PropTypes.func,
getCustomEmoji: PropTypes.func,
theme: PropTypes.string
diff --git a/app/containers/message/Audio.js b/app/containers/message/Audio.js
index 2763fb4ec..12102b164 100644
--- a/app/containers/message/Audio.js
+++ b/app/containers/message/Audio.js
@@ -74,7 +74,6 @@ class Audio extends React.Component {
file: PropTypes.object.isRequired,
baseUrl: PropTypes.string.isRequired,
user: PropTypes.object.isRequired,
- useMarkdown: PropTypes.bool,
theme: PropTypes.string,
split: PropTypes.bool,
getCustomEmoji: PropTypes.func
@@ -157,7 +156,7 @@ class Audio extends React.Component {
uri, paused, currentTime, duration
} = this.state;
const {
- user, baseUrl, file, getCustomEmoji, useMarkdown, split, theme
+ user, baseUrl, file, getCustomEmoji, split, theme
} = this.props;
const { description } = file;
@@ -199,7 +198,7 @@ class Audio extends React.Component {
/>
{this.duration}
-
+
>
);
}
diff --git a/app/containers/message/Content.js b/app/containers/message/Content.js
index 8257bae48..e358f2b2a 100644
--- a/app/containers/message/Content.js
+++ b/app/containers/message/Content.js
@@ -29,7 +29,6 @@ const Content = React.memo((props) => {
preview={props.tmid && !props.isThreadRoom}
channels={props.channels}
mentions={props.mentions}
- useMarkdown={props.useMarkdown && (!props.tmid || props.isThreadRoom)}
navToRoomInfo={props.navToRoomInfo}
tmid={props.tmid}
useRealName={props.useRealName}
@@ -53,7 +52,6 @@ Content.propTypes = {
msg: PropTypes.string,
theme: PropTypes.string,
isEdited: PropTypes.bool,
- useMarkdown: PropTypes.bool,
baseUrl: PropTypes.string,
user: PropTypes.object,
getCustomEmoji: PropTypes.func,
diff --git a/app/containers/message/Image.js b/app/containers/message/Image.js
index e44b7cad6..72b3a6c6f 100644
--- a/app/containers/message/Image.js
+++ b/app/containers/message/Image.js
@@ -41,7 +41,7 @@ export const MessageImage = React.memo(({ img, theme }) => (
));
const ImageContainer = React.memo(({
- file, imageUrl, baseUrl, user, useMarkdown, showAttachment, getCustomEmoji, split, theme
+ file, imageUrl, baseUrl, user, showAttachment, getCustomEmoji, split, theme
}) => {
const img = imageUrl || formatAttachmentUrl(file.image_url, user.id, user.token, baseUrl);
if (!img) {
@@ -55,7 +55,7 @@ const ImageContainer = React.memo(({
);
@@ -73,7 +73,6 @@ ImageContainer.propTypes = {
imageUrl: PropTypes.string,
baseUrl: PropTypes.string,
user: PropTypes.object,
- useMarkdown: PropTypes.bool,
showAttachment: PropTypes.func,
theme: PropTypes.string,
getCustomEmoji: PropTypes.func,
diff --git a/app/containers/message/Reply.js b/app/containers/message/Reply.js
index 5b6230a41..254beba5f 100644
--- a/app/containers/message/Reply.js
+++ b/app/containers/message/Reply.js
@@ -79,7 +79,7 @@ const Title = React.memo(({ attachment, timeFormat, theme }) => {
});
const Description = React.memo(({
- attachment, baseUrl, user, getCustomEmoji, useMarkdown, theme
+ attachment, baseUrl, user, getCustomEmoji, theme
}) => {
const text = attachment.text || attachment.title;
if (!text) {
@@ -91,7 +91,6 @@ const Description = React.memo(({
baseUrl={baseUrl}
username={user.username}
getCustomEmoji={getCustomEmoji}
- useMarkdown={useMarkdown}
theme={theme}
/>
);
@@ -125,7 +124,7 @@ const Fields = React.memo(({ attachment, theme }) => {
}, (prevProps, nextProps) => isEqual(prevProps.attachment.fields, nextProps.attachment.fields) && prevProps.theme === nextProps.theme);
const Reply = React.memo(({
- attachment, timeFormat, baseUrl, user, index, getCustomEmoji, useMarkdown, split, theme
+ attachment, timeFormat, baseUrl, user, index, getCustomEmoji, split, theme
}) => {
if (!attachment) {
return null;
@@ -164,7 +163,6 @@ const Reply = React.memo(({
baseUrl={baseUrl}
user={user}
getCustomEmoji={getCustomEmoji}
- useMarkdown={useMarkdown}
theme={theme}
/>
@@ -179,7 +177,6 @@ Reply.propTypes = {
baseUrl: PropTypes.string,
user: PropTypes.object,
index: PropTypes.number,
- useMarkdown: PropTypes.bool,
theme: PropTypes.string,
getCustomEmoji: PropTypes.func,
split: PropTypes.bool
@@ -197,7 +194,6 @@ Description.propTypes = {
attachment: PropTypes.object,
baseUrl: PropTypes.string,
user: PropTypes.object,
- useMarkdown: PropTypes.bool,
getCustomEmoji: PropTypes.func,
theme: PropTypes.string
};
diff --git a/app/containers/message/Video.js b/app/containers/message/Video.js
index a96967d5f..a30c3abe8 100644
--- a/app/containers/message/Video.js
+++ b/app/containers/message/Video.js
@@ -27,7 +27,7 @@ const styles = StyleSheet.create({
});
const Video = React.memo(({
- file, baseUrl, user, useMarkdown, showAttachment, getCustomEmoji, theme
+ file, baseUrl, user, showAttachment, getCustomEmoji, theme
}) => {
if (!baseUrl) {
return null;
@@ -54,7 +54,7 @@ const Video = React.memo(({
color={themes[theme].buttonText}
/>
-
+
>
);
}, (prevProps, nextProps) => isEqual(prevProps.file, nextProps.file) && prevProps.theme === nextProps.theme);
@@ -63,7 +63,6 @@ Video.propTypes = {
file: PropTypes.object,
baseUrl: PropTypes.string,
user: PropTypes.object,
- useMarkdown: PropTypes.bool,
showAttachment: PropTypes.func,
getCustomEmoji: PropTypes.func,
theme: PropTypes.string
diff --git a/app/containers/message/index.js b/app/containers/message/index.js
index c114e8c4e..1a49b80f6 100644
--- a/app/containers/message/index.js
+++ b/app/containers/message/index.js
@@ -28,7 +28,6 @@ class MessageContainer extends React.Component {
isReadReceiptEnabled: PropTypes.bool,
isThreadRoom: PropTypes.bool,
useRealName: PropTypes.bool,
- useMarkdown: PropTypes.bool,
autoTranslateRoom: PropTypes.bool,
autoTranslateLanguage: PropTypes.string,
status: PropTypes.number,
@@ -227,7 +226,7 @@ class MessageContainer extends React.Component {
render() {
const {
- item, user, style, archived, baseUrl, useRealName, broadcast, fetchThreadName, customThreadTimeFormat, showAttachment, timeFormat, useMarkdown, isReadReceiptEnabled, autoTranslateRoom, autoTranslateLanguage, navToRoomInfo, getCustomEmoji, isThreadRoom, callJitsi, blockAction, rid, theme
+ item, user, style, archived, baseUrl, useRealName, broadcast, fetchThreadName, customThreadTimeFormat, showAttachment, timeFormat, isReadReceiptEnabled, autoTranslateRoom, autoTranslateLanguage, navToRoomInfo, getCustomEmoji, isThreadRoom, callJitsi, blockAction, rid, theme
} = this.props;
const {
id, msg, ts, attachments, urls, reactions, t, avatar, u, alias, editedBy, role, drid, dcount, dlm, tmid, tcount, tlm, tmsg, mentions, channels, unread, blocks, autoTranslate: autoTranslateMessage
@@ -272,7 +271,6 @@ class MessageContainer extends React.Component {
tcount={tcount}
tlm={tlm}
tmsg={tmsg}
- useMarkdown={useMarkdown}
fetchThreadName={fetchThreadName}
mentions={mentions}
channels={channels}
diff --git a/app/i18n/locales/de.js b/app/i18n/locales/de.js
index 133b7b177..ac4cc04c7 100644
--- a/app/i18n/locales/de.js
+++ b/app/i18n/locales/de.js
@@ -183,7 +183,6 @@ export default {
EMAIL: 'EMAIL',
email: 'Email',
Enable_Auto_Translate: 'Automatische Übersetzung aktivieren',
- Enable_markdown: 'Markdown aktivieren',
Enable_notifications: 'Benachrichtigungen aktivieren',
Everyone_can_access_this_channel: 'Jeder kann auf diesen Kanal zugreifen',
erasing_room: 'lösche Raum',
diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js
index f995fae58..7f40b56b1 100644
--- a/app/i18n/locales/en.js
+++ b/app/i18n/locales/en.js
@@ -183,7 +183,6 @@ export default {
EMAIL: 'EMAIL',
email: 'e-mail',
Enable_Auto_Translate: 'Enable Auto-Translate',
- Enable_markdown: 'Enable markdown',
Enable_notifications: 'Enable notifications',
Everyone_can_access_this_channel: 'Everyone can access this channel',
erasing_room: 'erasing room',
diff --git a/app/i18n/locales/es-ES.js b/app/i18n/locales/es-ES.js
index 6d8037394..9b408ee94 100644
--- a/app/i18n/locales/es-ES.js
+++ b/app/i18n/locales/es-ES.js
@@ -176,7 +176,6 @@ export default {
EMAIL: 'EMAIL',
email: 'e-mail',
Enable_Auto_Translate: 'Permitir Auto-Translate',
- Enable_markdown: 'Permitir markdown',
Enable_notifications: 'Permitir notificaciones',
Everyone_can_access_this_channel: 'Todos los usuarios pueden acceder a este canal',
erasing_room: 'eliminando sala',
diff --git a/app/i18n/locales/it.js b/app/i18n/locales/it.js
index a67008369..5e7f44fc5 100644
--- a/app/i18n/locales/it.js
+++ b/app/i18n/locales/it.js
@@ -179,7 +179,6 @@ export default {
EMAIL: 'E-MAIL',
email: 'e-mail',
Enable_Auto_Translate: 'Abilita traduzione automatica',
- Enable_markdown: 'Abilita Markdown',
Enable_notifications: 'Abilita notifiche',
Everyone_can_access_this_channel: 'Tutti hanno accesso a questo canale',
erasing_room: 'cancellazione stanza',
diff --git a/app/i18n/locales/nl.js b/app/i18n/locales/nl.js
index c46cc5384..68170e489 100644
--- a/app/i18n/locales/nl.js
+++ b/app/i18n/locales/nl.js
@@ -179,7 +179,6 @@ export default {
EMAIL: 'EMAIL',
email: 'e-mail',
Enable_Auto_Translate: 'Zet Auto-Translate aan',
- Enable_markdown: 'Zet markdown aan',
Enable_notifications: 'Zet notifications aan',
Everyone_can_access_this_channel: 'Iedereen kan bij dit kanaal',
erasing_room: 'kamer legen',
diff --git a/app/i18n/locales/pt-BR.js b/app/i18n/locales/pt-BR.js
index 1729b0bf6..61711e32f 100644
--- a/app/i18n/locales/pt-BR.js
+++ b/app/i18n/locales/pt-BR.js
@@ -177,7 +177,6 @@ export default {
Email_or_password_field_is_empty: 'Email ou senha estão vazios',
Email: 'Email',
email: 'e-mail',
- Enable_markdown: 'Habilitar markdown',
Enable_notifications: 'Habilitar notificações',
Everyone_can_access_this_channel: 'Todos podem acessar este canal',
Error_uploading: 'Erro subindo',
diff --git a/app/i18n/locales/ru.js b/app/i18n/locales/ru.js
index 02f7f46b9..b254dca92 100644
--- a/app/i18n/locales/ru.js
+++ b/app/i18n/locales/ru.js
@@ -171,7 +171,6 @@ export default {
EMAIL: 'EMAIL',
email: 'e-mail',
Enable_Auto_Translate: 'Включить автоперевод',
- Enable_markdown: 'Включить markdown',
Enable_notifications: 'Включить уведомления',
Everyone_can_access_this_channel: 'Каждый может получить доступ к этому каналу',
erasing_room: 'стирание комнаты',
diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js
index 3d275eb57..5406eed67 100644
--- a/app/lib/rocketchat.js
+++ b/app/lib/rocketchat.js
@@ -50,7 +50,6 @@ import I18n from '../i18n';
const TOKEN_KEY = 'reactnativemeteor_usertoken';
const SORT_PREFS_KEY = 'RC_SORT_PREFS_KEY';
-export const MARKDOWN_KEY = 'RC_MARKDOWN_KEY';
export const THEME_PREFERENCES_KEY = 'RC_THEME_PREFERENCES_KEY';
export const CRASH_REPORT_KEY = 'RC_CRASH_REPORT_KEY';
const returnAnArray = obj => obj || [];
@@ -884,13 +883,6 @@ const RocketChat = {
// RC 0.51.0
return this.sdk.methodCall('setAvatarFromService', data, contentType, service);
},
- async getUseMarkdown() {
- const useMarkdown = await AsyncStorage.getItem(MARKDOWN_KEY);
- if (useMarkdown === null) {
- return true;
- }
- return JSON.parse(useMarkdown);
- },
async getAllowCrashReport() {
const allowCrashReport = await AsyncStorage.getItem(CRASH_REPORT_KEY);
if (allowCrashReport === null) {
diff --git a/app/reducers/index.js b/app/reducers/index.js
index 5d8a3df38..1962f0444 100644
--- a/app/reducers/index.js
+++ b/app/reducers/index.js
@@ -9,7 +9,6 @@ import createChannel from './createChannel';
import app from './app';
import sortPreferences from './sortPreferences';
import notification from './notification';
-import markdown from './markdown';
import share from './share';
import crashReport from './crashReport';
import customEmojis from './customEmojis';
@@ -28,7 +27,6 @@ export default combineReducers({
rooms,
sortPreferences,
notification,
- markdown,
share,
crashReport,
customEmojis,
diff --git a/app/reducers/markdown.js b/app/reducers/markdown.js
deleted file mode 100644
index aa3fb49f4..000000000
--- a/app/reducers/markdown.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { TOGGLE_MARKDOWN } from '../actions/actionsTypes';
-
-const initialState = {
- useMarkdown: true
-};
-
-
-export default (state = initialState, action) => {
- switch (action.type) {
- case TOGGLE_MARKDOWN:
- return {
- useMarkdown: action.payload
- };
- default:
- return state;
- }
-};
diff --git a/app/sagas/init.js b/app/sagas/init.js
index db31b764c..1db148ab8 100644
--- a/app/sagas/init.js
+++ b/app/sagas/init.js
@@ -7,7 +7,6 @@ import RNBootSplash from 'react-native-bootsplash';
import * as actions from '../actions';
import { selectServerRequest } from '../actions/server';
import { setAllPreferences } from '../actions/sortPreferences';
-import { toggleMarkdown } from '../actions/markdown';
import { toggleCrashReport } from '../actions/crashReport';
import { APP } from '../actions/actionsTypes';
import RocketChat from '../lib/rocketchat';
@@ -24,9 +23,6 @@ export const initLocalSettings = function* initLocalSettings() {
const sortPreferences = yield RocketChat.getSortPreferences();
yield put(setAllPreferences(sortPreferences));
- const useMarkdown = yield RocketChat.getUseMarkdown();
- yield put(toggleMarkdown(useMarkdown));
-
const allowCrashReport = yield RocketChat.getAllowCrashReport();
yield put(toggleCrashReport(allowCrashReport));
};
diff --git a/app/views/RoomInfoView/index.js b/app/views/RoomInfoView/index.js
index b415e81d6..d2937a7c6 100644
--- a/app/views/RoomInfoView/index.js
+++ b/app/views/RoomInfoView/index.js
@@ -175,7 +175,6 @@ class RoomInfoView extends React.Component {
{I18n.t(camelize(key))}
diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js
index 94a2e79f2..247923d43 100644
--- a/app/views/RoomView/index.js
+++ b/app/views/RoomView/index.js
@@ -146,7 +146,6 @@ class RoomView extends React.Component {
baseUrl: PropTypes.string,
customEmojis: PropTypes.object,
screenProps: PropTypes.object,
- useMarkdown: PropTypes.bool,
theme: PropTypes.string,
replyBroadcast: PropTypes.func
};
@@ -726,7 +725,7 @@ class RoomView extends React.Component {
renderItem = (item, previousItem) => {
const { room, lastOpen, canAutoTranslate } = this.state;
const {
- user, Message_GroupingPeriod, Message_TimeFormat, useRealName, baseUrl, useMarkdown, Message_Read_Receipt_Enabled, theme
+ user, Message_GroupingPeriod, Message_TimeFormat, useRealName, baseUrl, Message_Read_Receipt_Enabled, theme
} = this.props;
let dateSeparator = null;
let showUnreadSeparator = false;
@@ -767,7 +766,6 @@ class RoomView extends React.Component {
Message_GroupingPeriod={Message_GroupingPeriod}
timeFormat={Message_TimeFormat}
useRealName={useRealName}
- useMarkdown={useMarkdown}
isReadReceiptEnabled={Message_Read_Receipt_Enabled}
autoTranslateRoom={canAutoTranslate && room.autoTranslate}
autoTranslateLanguage={room.autoTranslateLanguage}
@@ -805,7 +803,6 @@ class RoomView extends React.Component {
return (
this.toggleAnnouncementModal(true)}>
{I18n.t('Announcement')}
@@ -1007,7 +1003,6 @@ const mapStateToProps = state => ({
isAuthenticated: state.login.isAuthenticated,
Message_GroupingPeriod: state.settings.Message_GroupingPeriod,
Message_TimeFormat: state.settings.Message_TimeFormat,
- useMarkdown: state.markdown.useMarkdown,
customEmojis: state.customEmojis,
baseUrl: state.server.server,
Message_Read_Receipt_Enabled: state.settings.Message_Read_Receipt_Enabled,
diff --git a/app/views/SettingsView/index.js b/app/views/SettingsView/index.js
index 68b4c921b..adafca1d7 100644
--- a/app/views/SettingsView/index.js
+++ b/app/views/SettingsView/index.js
@@ -7,7 +7,6 @@ import { connect } from 'react-redux';
import { SafeAreaView } from 'react-navigation';
import { logout as logoutAction, loginRequest as loginRequestAction } from '../../actions/login';
-import { toggleMarkdown as toggleMarkdownAction } from '../../actions/markdown';
import { toggleCrashReport as toggleCrashReportAction } from '../../actions/crashReport';
import { SWITCH_TRACK_COLOR, themes } from '../../constants/colors';
import { DrawerButton, CloseModalButton } from '../../containers/HeaderButton';
@@ -16,7 +15,7 @@ import ListItem from '../../containers/ListItem';
import { DisclosureImage } from '../../containers/DisclosureIndicator';
import Separator from '../../containers/Separator';
import I18n from '../../i18n';
-import RocketChat, { MARKDOWN_KEY, CRASH_REPORT_KEY } from '../../lib/rocketchat';
+import RocketChat, { CRASH_REPORT_KEY } from '../../lib/rocketchat';
import {
getReadableVersion, getDeviceModel, isAndroid
} from '../../utils/deviceInfo';
@@ -77,9 +76,7 @@ class SettingsView extends React.Component {
static propTypes = {
navigation: PropTypes.object,
server: PropTypes.object,
- useMarkdown: PropTypes.bool,
allowCrashReport: PropTypes.bool,
- toggleMarkdown: PropTypes.func,
toggleCrashReport: PropTypes.func,
theme: PropTypes.string,
split: PropTypes.bool,
@@ -118,12 +115,6 @@ class SettingsView extends React.Component {
});
}
- toggleMarkdown = (value) => {
- AsyncStorage.setItem(MARKDOWN_KEY, JSON.stringify(value));
- const { toggleMarkdown } = this.props;
- toggleMarkdown(value);
- }
-
toggleCrashReport = (value) => {
AsyncStorage.setItem(CRASH_REPORT_KEY, JSON.stringify(value));
const { toggleCrashReport } = this.props;
@@ -185,17 +176,6 @@ class SettingsView extends React.Component {
return ;
}
- renderMarkdownSwitch = () => {
- const { useMarkdown } = this.props;
- return (
-
- );
- }
-
renderCrashReportSwitch = () => {
const { allowCrashReport } = this.props;
return (
@@ -323,13 +303,6 @@ class SettingsView extends React.Component {
- this.renderMarkdownSwitch()}
- theme={theme}
- />
-
({
server: state.server,
token: getUserSelector(state).token,
- useMarkdown: state.markdown.useMarkdown,
allowCrashReport: state.crashReport.allowCrashReport
});
const mapDispatchToProps = dispatch => ({
logout: () => dispatch(logoutAction()),
loginRequest: (...params) => dispatch(loginRequestAction(...params)),
- toggleMarkdown: params => dispatch(toggleMarkdownAction(params)),
toggleCrashReport: params => dispatch(toggleCrashReportAction(params)),
appStart: params => dispatch(appStartAction(params))
});
diff --git a/e2e/14-setting.spec.js b/e2e/14-setting.spec.js
index 326c5dd7b..762c705d4 100644
--- a/e2e/14-setting.spec.js
+++ b/e2e/14-setting.spec.js
@@ -44,10 +44,6 @@ describe('Settings screen', () => {
it('should have server version', async() => {
await expect(element(by.id('settings-view-server-version'))).toExist();
});
-
- it('should have enable markdown', async() => {
- await expect(element(by.id('settings-view-markdown'))).toExist();
- });
after(async() => {
takeScreenshot();