Merge pull request #1321 from matrix-org/rxl881/warnings

Only render appTile body (including warnings) if drawer shown.
This commit is contained in:
Richard Lewis 2017-08-18 18:43:21 +01:00 committed by GitHub
commit 388d8141ae

View file

@ -223,6 +223,7 @@ export default React.createClass({
safeWidgetUrl = url.format(parsedWidgetUrl); safeWidgetUrl = url.format(parsedWidgetUrl);
} }
if (this.props.show) {
if (this.state.loading) { if (this.state.loading) {
appTileBody = ( appTileBody = (
<div className='mx_AppTileBody mx_AppLoading'> <div className='mx_AppTileBody mx_AppLoading'>
@ -238,7 +239,7 @@ export default React.createClass({
/> />
</div> </div>
); );
} else if (this.props.show) { } else {
appTileBody = ( appTileBody = (
<div className="mx_AppTileBody"> <div className="mx_AppTileBody">
<iframe <iframe
@ -260,6 +261,7 @@ export default React.createClass({
</div> </div>
); );
} }
}
// editing is done in scalar // editing is done in scalar
const showEditButton = Boolean(this._scalarClient && this._canUserModify()); const showEditButton = Boolean(this._scalarClient && this._canUserModify());