Move platform setting to its own thing
This commit is contained in:
parent
f62f2e8f25
commit
7b4694c637
1 changed files with 4 additions and 2 deletions
|
@ -46,6 +46,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|||
var RunModernizrTests = require("./modernizr"); // this side-effects a global
|
||||
var ReactDOM = require("react-dom");
|
||||
var sdk = require("matrix-react-sdk");
|
||||
var PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg");
|
||||
sdk.loadSkin(require('../component-index'));
|
||||
var VectorConferenceHandler = require('../VectorConferenceHandler');
|
||||
var UpdateChecker = require("./updater");
|
||||
|
@ -209,7 +210,9 @@ function onLoadCompleted() {
|
|||
async function loadApp() {
|
||||
const fragparts = parseQsFromFragment(window.location);
|
||||
const params = parseQs(window.location);
|
||||
const platform = new Platform();
|
||||
|
||||
// set the platform for react sdk (our Platform object automatically picks the right one)
|
||||
PlatformPeg.set(new Platform());
|
||||
|
||||
// don't try to redirect to the native apps if we're
|
||||
// verifying a 3pid
|
||||
|
@ -263,7 +266,6 @@ async function loadApp() {
|
|||
enableGuest={true}
|
||||
onLoadCompleted={onLoadCompleted}
|
||||
defaultDeviceDisplayName={getDefaultDeviceDisplayName()}
|
||||
platform={platform}
|
||||
/>,
|
||||
document.getElementById('matrixchat')
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue