Merge branch 'develop' into new-guest-access

This commit is contained in:
David Baker 2017-06-06 10:33:01 +01:00
commit f8198ba9c9
4 changed files with 12 additions and 3 deletions

View file

@ -513,7 +513,11 @@ module.exports = React.createClass({
this._onSetTheme(payload.value); this._onSetTheme(payload.value);
break; break;
case 'on_logging_in': 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; break;
case 'on_logged_in': case 'on_logged_in':
this._onLoggedIn(payload.teamToken); this._onLoggedIn(payload.teamToken);

View file

@ -88,6 +88,10 @@ const SETTINGS_LABELS = [
id: 'hideRedactions', id: 'hideRedactions',
label: 'Hide removed messages', label: 'Hide removed messages',
}, },
{
id: 'disableMarkdown',
label: 'Disable markdown formatting',
},
/* /*
{ {
id: 'useFixedWidthFont', id: 'useFixedWidthFont',

View file

@ -29,7 +29,6 @@ var Markdown = require("../../../Markdown");
var TYPING_USER_TIMEOUT = 10000; var TYPING_USER_TIMEOUT = 10000;
var TYPING_SERVER_TIMEOUT = 30000; var TYPING_SERVER_TIMEOUT = 30000;
var MARKDOWN_ENABLED = true;
export function onSendMessageFailed(err, room) { export function onSendMessageFailed(err, room) {
// XXX: temporary logging to try to diagnose // XXX: temporary logging to try to diagnose
@ -77,7 +76,8 @@ export default React.createClass({
componentWillMount: function() { componentWillMount: function() {
this.oldScrollHeight = 0; this.oldScrollHeight = 0;
this.markdownEnabled = MARKDOWN_ENABLED; this.markdownEnabled = !UserSettingsStore.getSyncedSetting('disableMarkdown', false);
var self = this; var self = this;
this.sentHistory = { this.sentHistory = {
// The list of typed messages. Index 0 is more recent // The list of typed messages. Index 0 is more recent

View file

@ -241,6 +241,7 @@
"Direct chats": "Direct chats", "Direct chats": "Direct chats",
"disabled": "disabled", "disabled": "disabled",
"Disable inline URL previews by default": "Disable inline URL previews by default", "Disable inline URL previews by default": "Disable inline URL previews by default",
"Disable markdown formatting": "Disable markdown formatting",
"Disinvite": "Disinvite", "Disinvite": "Disinvite",
"Display name": "Display name", "Display name": "Display name",
"Displays action": "Displays action", "Displays action": "Displays action",