Merge pull request #6368 from vector-im/luke/force-gemini

Force gemini on HomePage
This commit is contained in:
Luke Barnard 2018-03-27 17:32:03 +01:00 committed by GitHub
commit 13cc13924e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,10 +18,10 @@ limitations under the License.
'use strict'; 'use strict';
import React from 'react'; import React from 'react';
import GeminiScrollbar from 'react-gemini-scrollbar';
import request from 'browser-request'; import request from 'browser-request';
import { _t } from 'matrix-react-sdk/lib/languageHandler'; import { _t } from 'matrix-react-sdk/lib/languageHandler';
import sanitizeHtml from 'sanitize-html'; import sanitizeHtml from 'sanitize-html';
import sdk from 'matrix-react-sdk/lib';
module.exports = React.createClass({ module.exports = React.createClass({
displayName: 'HomePage', displayName: 'HomePage',
@ -99,11 +99,12 @@ module.exports = React.createClass({
); );
} }
else { else {
const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper");
return ( return (
<GeminiScrollbar autoshow={true} className="mx_HomePage"> <GeminiScrollbarWrapper autoshow={true} className="mx_HomePage">
<div className="mx_HomePage_body" dangerouslySetInnerHTML={{ __html: this.state.page }}> <div className="mx_HomePage_body" dangerouslySetInnerHTML={{ __html: this.state.page }}>
</div> </div>
</GeminiScrollbar> </GeminiScrollbarWrapper>
); );
} }
} }