diff --git a/src/SlashCommands.js b/src/SlashCommands.js index d4e7df3a16..fcdd33474e 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -352,11 +352,12 @@ module.exports = { }, getCommandList: function() { - // Return all the commands plus /me which isn't handled like normal commands + // Return all the commands plus /me and /markdown which aren't handled like normal commands var cmds = Object.keys(commands).sort().map(function(cmdKey) { return commands[cmdKey]; }) cmds.push(new Command("me", "", function(){})); + cmds.push(new Command("markdown", "", function(){})); return cmds; } diff --git a/src/components/views/elements/TruncatedList.js b/src/components/views/elements/TruncatedList.js index 275686c6be..3e174848d3 100644 --- a/src/components/views/elements/TruncatedList.js +++ b/src/components/views/elements/TruncatedList.js @@ -51,7 +51,7 @@ module.exports = React.createClass({ if (this.props.truncateAt >= 0) { var overflowCount = childCount - this.props.truncateAt; - if (overflowCount > 0) { + if (overflowCount > 1) { overflowJsx = this.props.createOverflowElement( overflowCount, childCount ); diff --git a/src/components/views/rooms/InviteMemberList.js b/src/components/views/rooms/InviteMemberList.js index 73ee4f7c27..480066771b 100644 --- a/src/components/views/rooms/InviteMemberList.js +++ b/src/components/views/rooms/InviteMemberList.js @@ -89,7 +89,7 @@ module.exports = React.createClass({ } return ( - - {this.state.results.map((entity) => { - return entity.getJsx(); - })} - - ); - } - else { - list = ( -
- {this.state.results.map((entity) => { - return entity.getJsx(); - })} -
- ); + if (this.state.results.length) { + if (this.props.truncateAt) { // caller wants list truncated + var TruncatedList = sdk.getComponent("elements.TruncatedList"); + list = ( + + {this.state.results.map((entity) => { + return entity.getJsx(); + })} + + ); + } + else { + list = ( +
+ {this.state.results.map((entity) => { + return entity.getJsx(); + })} +
+ ); + } + list = + { list } + ; } return (
- {inputBox} - - { list } - + { inputBox } + { list } { this.state.query.length ?

: '' }
);