diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index c362d4548..8bc731c11 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -22,7 +22,7 @@ limitations under the License. import VectorBasePlatform, {updateCheckStatusEnum} from './VectorBasePlatform'; import BaseEventIndexManager from 'matrix-react-sdk/src/indexing/BaseEventIndexManager'; -import dis from 'matrix-react-sdk/src/dispatcher'; +import dis from 'matrix-react-sdk/src/dispatcher/dispatcher'; import { _t, _td } from 'matrix-react-sdk/src/languageHandler'; import * as rageshake from 'matrix-react-sdk/src/rageshake/rageshake'; import {MatrixClient} from "matrix-js-sdk"; @@ -33,6 +33,7 @@ import {Categories, Modifiers, registerShortcut} from "matrix-react-sdk/src/acce import {Key} from "matrix-react-sdk/src/Keyboard"; import React from "react"; import {randomString} from "matrix-js-sdk/src/randomstring"; +import {Action} from "matrix-react-sdk/src/dispatcher/actions"; const ipcRenderer = window.ipcRenderer; const isMac = navigator.platform.toUpperCase().includes('MAC'); @@ -213,7 +214,7 @@ export default class ElectronPlatform extends VectorBasePlatform { ipcRenderer.on('update-downloaded', this.onUpdateDownloaded.bind(this)); ipcRenderer.on('preferences', () => { - dis.dispatch({ action: 'view_user_settings' }); + dis.fire(Action.ViewUserSettings); }); this.startUpdateCheck = this.startUpdateCheck.bind(this); diff --git a/src/vector/platform/VectorBasePlatform.js b/src/vector/platform/VectorBasePlatform.js index b6b25236a..fad3045c6 100644 --- a/src/vector/platform/VectorBasePlatform.js +++ b/src/vector/platform/VectorBasePlatform.js @@ -21,7 +21,7 @@ limitations under the License. import BasePlatform from 'matrix-react-sdk/src/BasePlatform'; import { _t } from 'matrix-react-sdk/src/languageHandler'; -import dis from 'matrix-react-sdk/src/dispatcher'; +import dis from 'matrix-react-sdk/src/dispatcher/dispatcher'; import {getVectorConfig} from "../getconfig"; import Favico from '../../favicon'; diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index b4a01f78c..831ca8cc1 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -20,7 +20,7 @@ limitations under the License. import VectorBasePlatform, {updateCheckStatusEnum} from './VectorBasePlatform'; import request from 'browser-request'; -import dis from 'matrix-react-sdk/src/dispatcher'; +import dis from 'matrix-react-sdk/src/dispatcher/dispatcher'; import { _t } from 'matrix-react-sdk/src/languageHandler'; import url from 'url'; diff --git a/test/app-tests/loading-test.js b/test/app-tests/loading-test.js index beb62270f..64872aaac 100644 --- a/test/app-tests/loading-test.js +++ b/test/app-tests/loading-test.js @@ -29,7 +29,7 @@ import * as jssdk from 'matrix-js-sdk'; import * as sdk from 'matrix-react-sdk'; import {MatrixClientPeg} from 'matrix-react-sdk/src/MatrixClientPeg'; import {Views} from 'matrix-react-sdk/src/components/structures/MatrixChat'; -import dis from 'matrix-react-sdk/src/dispatcher'; +import dis from 'matrix-react-sdk/src/dispatcher/dispatcher'; import * as test_utils from '../test-utils'; import MockHttpBackend from 'matrix-mock-request'; import {parseQs, parseQsFromFragment} from '../../src/vector/url_utils';