Merge pull request #13666 from vector-im/travis/dispatcher-types

Move dispatcher references in support of TypeScript conversion
pull/13737/head
Travis Ralston 2020-05-18 23:22:35 -06:00 committed by GitHub
commit 6d99c08e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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';

View File

@ -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';

View File

@ -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';