From 6cf11a15e62d8864a351fc1bc76fd5b4e8f4b75c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 26 Jun 2018 11:59:16 +0100 Subject: [PATCH] Move WidgetUtils to utils dir --- src/CallHandler.js | 2 +- src/ScalarMessaging.js | 2 +- src/components/views/elements/AppPermission.js | 2 +- src/components/views/elements/AppTile.js | 2 +- src/components/views/rooms/AppsDrawer.js | 2 +- src/components/views/rooms/Stickerpicker.js | 2 +- src/{ => utils}/WidgetUtils.js | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) rename src/{ => utils}/WidgetUtils.js (99%) diff --git a/src/CallHandler.js b/src/CallHandler.js index 852827f6fe..05aa9d974f 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -61,7 +61,7 @@ import Matrix from 'matrix-js-sdk'; import dis from './dispatcher'; import { showUnknownDeviceDialogForCalls } from './cryptodevices'; import SettingsStore from "./settings/SettingsStore"; -import WidgetUtils from './WidgetUtils'; +import WidgetUtils from './utils/WidgetUtils'; global.mxCalls = { //room_id: MatrixCall diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index 24c69194f5..fb5ea9f76d 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -236,7 +236,7 @@ import SdkConfig from './SdkConfig'; import MatrixClientPeg from './MatrixClientPeg'; import { MatrixEvent } from 'matrix-js-sdk'; import dis from './dispatcher'; -import WidgetUtils from './WidgetUtils'; +import WidgetUtils from './utils/WidgetUtils'; import RoomViewStore from './stores/RoomViewStore'; import { _t } from './languageHandler'; diff --git a/src/components/views/elements/AppPermission.js b/src/components/views/elements/AppPermission.js index 231ed52364..6b4536b620 100644 --- a/src/components/views/elements/AppPermission.js +++ b/src/components/views/elements/AppPermission.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import url from 'url'; import { _t } from '../../../languageHandler'; -import WidgetUtils from "../../../WidgetUtils"; +import WidgetUtils from "../../../utils/WidgetUtils"; export default class AppPermission extends React.Component { constructor(props) { diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 70b5bd651e..61d5a0f1ac 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -31,7 +31,7 @@ import sdk from '../../../index'; import AppPermission from './AppPermission'; import AppWarning from './AppWarning'; import MessageSpinner from './MessageSpinner'; -import WidgetUtils from '../../../WidgetUtils'; +import WidgetUtils from '../../../utils/WidgetUtils'; import dis from '../../../dispatcher'; const ALLOWED_APP_URL_SCHEMES = ['https:', 'http:']; diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index f0b7eaa1d7..ecf9859d2b 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -27,7 +27,7 @@ import SdkConfig from '../../../SdkConfig'; import ScalarAuthClient from '../../../ScalarAuthClient'; import ScalarMessaging from '../../../ScalarMessaging'; import { _t } from '../../../languageHandler'; -import WidgetUtils from '../../../WidgetUtils'; +import WidgetUtils from '../../../utils/WidgetUtils'; import SettingsStore from "../../../settings/SettingsStore"; // The maximum number of widgets that can be added in a room diff --git a/src/components/views/rooms/Stickerpicker.js b/src/components/views/rooms/Stickerpicker.js index 992e5b7c53..4cb7c59ce6 100644 --- a/src/components/views/rooms/Stickerpicker.js +++ b/src/components/views/rooms/Stickerpicker.js @@ -23,7 +23,7 @@ import SdkConfig from '../../../SdkConfig'; import ScalarAuthClient from '../../../ScalarAuthClient'; import dis from '../../../dispatcher'; import AccessibleButton from '../elements/AccessibleButton'; -import WidgetUtils from '../../../WidgetUtils'; +import WidgetUtils from '../../../utils/WidgetUtils'; const widgetType = 'm.stickerpicker'; diff --git a/src/WidgetUtils.js b/src/utils/WidgetUtils.js similarity index 99% rename from src/WidgetUtils.js rename to src/utils/WidgetUtils.js index f54419f5e2..933609b302 100644 --- a/src/WidgetUtils.js +++ b/src/utils/WidgetUtils.js @@ -15,9 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; -import SdkConfig from "./SdkConfig"; -import dis from './dispatcher'; +import MatrixClientPeg from '../MatrixClientPeg'; +import SdkConfig from "../SdkConfig"; +import dis from '../dispatcher'; import * as url from "url"; export default class WidgetUtils {