diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 0b1663ee11..a1a6a50fd2 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -513,7 +513,11 @@ module.exports = React.createClass({ this._onSetTheme(payload.value); break; case 'on_logging_in': - this.setState({loggingIn: true}); + // We are now logging in, so set the state to reflect that + // and also that we're not ready (we'll be marked as logged + // in once the login completes, then ready once the sync + // completes). + this.setState({loggingIn: true, ready: false}); break; case 'on_logged_in': this._onLoggedIn(payload.teamToken); diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 7e4663bad7..3187a84b6d 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -88,6 +88,10 @@ const SETTINGS_LABELS = [ id: 'hideRedactions', label: 'Hide removed messages', }, + { + id: 'disableMarkdown', + label: 'Disable markdown formatting', + }, /* { id: 'useFixedWidthFont', diff --git a/src/components/views/rooms/MessageComposerInputOld.js b/src/components/views/rooms/MessageComposerInputOld.js index f6af20c03b..80fb51e6b5 100644 --- a/src/components/views/rooms/MessageComposerInputOld.js +++ b/src/components/views/rooms/MessageComposerInputOld.js @@ -29,7 +29,6 @@ var Markdown = require("../../../Markdown"); var TYPING_USER_TIMEOUT = 10000; var TYPING_SERVER_TIMEOUT = 30000; -var MARKDOWN_ENABLED = true; export function onSendMessageFailed(err, room) { // XXX: temporary logging to try to diagnose @@ -77,7 +76,8 @@ export default React.createClass({ componentWillMount: function() { this.oldScrollHeight = 0; - this.markdownEnabled = MARKDOWN_ENABLED; + this.markdownEnabled = !UserSettingsStore.getSyncedSetting('disableMarkdown', false); + var self = this; this.sentHistory = { // The list of typed messages. Index 0 is more recent diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 8c069537cb..aad80dc5bf 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -241,6 +241,7 @@ "Direct chats": "Direct chats", "disabled": "disabled", "Disable inline URL previews by default": "Disable inline URL previews by default", + "Disable markdown formatting": "Disable markdown formatting", "Disinvite": "Disinvite", "Display name": "Display name", "Displays action": "Displays action",