message: Fix various loadingElement related issues.
diff: @@ -312,24 +312,24 @@ export default React.createClass({
  }
  if (this.props.show) {
  - if (this.state.initialising) {
  - appTileBody = (
  + const loadingElement = (
  <div className='mx_AppTileBody mx_AppLoading'>
  <MessageSpinner msg='Loading...' />
  </div>
  );
  + if (this.state.initialising) {
  + appTileBody = loadingElement;
  } else if (this.state.hasPermissionToLoad == true) {
  - const loadingElement = (
  + if (this.isMixedContent()) {
  + appTileBody = (
  <div className="mx_AppTileBody">
  <AppWarning errorMsg="Error - Mixed content" />
  </div>
  );
  - if (this.isMixedContent()) {
  - appTileBody = loadingElement;
  } else {
  appTileBody = (
  - <div className={this.loading ? 'mx_AppTileBody mx_AppLoading' : 'mx_AppTileBody'}>
  - { this.loading && Element }
  + <div className={this.state.loading ? 'mx_AppTileBody mx_AppLoading' : 'mx_AppTileBody'}>
  + { this.loading && loadingElement }
  <iframe
  ref="appFrame"
  src={safeWidgetUrl}
  